experiments in a post-browser web
10
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs(tasks): add tag-action-toggles full-fix plan (6 phases)

+16
+16
docs/tasks.md
··· 21 21 - [ ] **Page host window jumps to wrong position after switching primary monitor.** Repro: connect external monitor, set it primary; open page host (cmd+L); disconnect/swap so the laptop becomes primary; cmd+L again — the whole window shifts to a different (off-screen / wrong-display) position. Likely cause: `computeWindowBounds`/canvas positioning caches screen bounds at first compute or reads stale `screen.getPrimaryDisplay()`/`getDisplayNearestPoint` results across display topology changes. Fix path: subscribe to Electron's `screen` `display-added`/`display-removed`/`display-metrics-changed` events and recompute the page-host window's normal+maximized bounds against current displays before show; clamp restored positions to a visible display. Surfaced 2026-04-24. 22 22 - [ ] **Proton Pass extension doesn't autofill.** Still broken — doesn't show up in form fields, no autofill suggestions. Likely a content-script injection or messaging API gap in the webview/canvas setup. Reproduce: install Proton Pass extension, navigate to any login page, observe no inline autofill UI. (2026-04-17: agent triaged, 5 hypotheses in agent-ae11e03d worktree — extension gitignored so couldn't repro.) 23 23 24 + - [ ] **Tag-action toggles never render in the tiles world.** Surfaced 2026-04-26 after fixing the `api.settings.get('data')` storage bug in `tag-actions/home.js` — even with valid pair data in the datastore, no toggle affordances appear on item cards in tags/groups/search/pagestream. Confirmed via direct user testing. Tag-actions toggles were "completely untested in tiles world" per the user. Fix is multi-step: 25 + 26 + **Phase 1 — pubsub topic allowlists.** Consumer features (`features/{tags,groups,search,pagestream}/manifest.json`) call `api.publish('tag-actions:get-all', {})` and subscribe to `:get-all:response` / `:create:response` / `:update:response` / `:delete:response` via `app/lib/tag-action-affordances.js:createActionRulesCache`. None of the 4 consumer manifests declare `tag-actions:*` in their `pubsub.topics` allowlist, so the publish is rejected (silently or with a `gate:rejected` event per `tile-ipc-gate.ts`). Add the 5 topics (`tag-actions:get-all`, `:get-all:response`, `:create:response`, `:update:response`, `:delete:response`) to each consumer's allowlist. Confirm by running packaged with `DEBUG=1`, opening tags/home and searching for `gate:rejected.*tag-actions` in stderr. 27 + 28 + **Phase 2 — verify the renderer end-to-end.** Once the round-trip publishes succeed, confirm `createActionRulesCache.getRules()` returns the rules to the consumer, that `resolveAffordances()` picks the right rule for an item's tags, and that `createAffordanceElements()` renders the toggle into a `.tag-action-affordances` container that's actually attached to each card. Search for callers in tags/groups/search/pagestream `home.js` — confirm each invokes both `resolveAffordances` AND inserts the returned element into the DOM. Likely gaps: missing call site, container CSS hides it, render is gated on a flag that's never set. 29 + 30 + **Phase 3 — subscribe-before-publish race on cold start.** The pubsub-FSM Phase 4/5 invariant is "subscribe before publish — no buffering." `tag-actions/home.js:init` subscribes to `tag-actions:get-all` only after `await loadSettings()` (≥1 datastore round-trip, plus migration writes). Consumer tiles (tags is `lazy:true`, groups/search/pagestream all eager + resident) may publish their first `tag-actions:get-all` before tag-actions has subscribed → request is dropped and the cache stays empty forever. Two viable fixes: (a) **proactive broadcast** — tag-actions/home.js publishes `tag-actions:get-all:response` once when its own init completes, so any consumer that subscribed earlier picks up the rules without needing to publish a request; (b) **lifecycle gate** — consumers wait for a `feature:tag-actions:ready` signal before publishing. (a) is simpler and matches the Phase-4 invariant; recommended. 31 + 32 + **Phase 4 — `api.subscribe`/`api.publish` legacy alias check.** `tag-action-affordances.js` still uses the legacy bare `api.subscribe`/`api.publish` (not `api.pubsub.subscribe`). Verify these aliases survive in `tile-preload.cts` (most tiles use `api.pubsub.*` now). If the bare names are gone, migrate. 33 + 34 + **Phase 5 — Playwright coverage.** Add `tests/desktop/tag-actions-toggles.spec.ts` that opens tags/home, applies the active tag (`todo`) to a test item, and asserts the toggle element renders and is clickable; click it, assert the active tag becomes the completed tag (`done`). Mirror for groups/search/pagestream. Without these, this regresses the next time someone touches the pubsub topic gate. 35 + 36 + **Phase 6 — toggle interaction.** Once toggles render, verify clicking one fires the add-tag/remove-tag round-trip (`tag-action-affordances.js:227,234`) — the consumer needs `tag:*` topics (which most already have) AND the right datastore.tags grants. Likely already covered but worth confirming. 37 + 38 + Don't ship the data-storage fix as "complete" until Phases 1-3 land. The data fix is necessary but insufficient. 39 + 24 40 --- 25 41 26 42 ## Features