Skip to content

#241: Option to hide the bar under the composer - #245

Merged
jparker2006 merged 2 commits into
mainfrom
room/241-wizbar-0-7-composer-footer
Nov 24, 2026
Merged

jparker2006 merged 2 commits into
mainfrom
room/241-wizbar-0-7-composer-footer

Conversation

@jparker2006

Copy link
Copy Markdown
Member

What changed

  • Added the composerFooter plugin setting (show, pinned, all; default show) with descriptor and reader in wizbar/src/settings.ts.
  • Added wizbar/src/composer-footer.ts and registered the composer-footer content script in wizbar/app.tsx to inject html[data-wizbar-hide-composer-footer] [data-follow-up-composer-footer] { display: none } once and remove it on dispose.
  • Added an effect in wizbar/src/ThreadInbox.tsx to set or clear data-wizbar-hide-composer-footer on document.documentElement based on composerFooter and the active thread's isPinned state, and clear it on unmount.
  • Added a Composer footer select ("Show", "Hide on pinned threads", "Hide everywhere") and a quiet note about data-follow-up-composer-footer to wizbar/src/SettingsPage.tsx.
  • Added wizbar footer <show|pinned|all> [--json] in wizbar/src/command.ts and wizbar/src/server.ts.
  • Documented the option in wizbar/README.md and added changes/241.md.

Out-of-owned-path changes

  • wizbar/src/upgrade-050.test.ts and wizbar/src/upgrade-060.test.ts: added composerFooter: "show" to the expected full-store reload snapshots, since both tests read every declared bb.settings.define handle and assert exact object equality.

How it was tested

  • Red run (commit 2d0e5da): npx vitest run --config vitest.config.ts --maxWorkers=2 src/composer-footer.test.ts src/settings.test.ts src/SettingsPage.test.tsx src/cli-parity.test.ts — 4 failed test files, 11 failed | 82 passed (93).
  • Green run (commit 88f23b4):
    • npm run typecheck — passed (0 errors).
    • npm test -- --maxWorkers=2 — 56 passed | 1 skipped (57 test files), 1644 passed | 2 skipped (1646 tests).

Closes #241

Built with Cloudroom

@jparker2006 jparker2006 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of 88f23b4:

I checked every acceptance criterion in #241 against the code and tests at this commit. In wizbar/, npm ci, npm run typecheck (0 errors) and npm test -- --maxWorkers=2 (56 files passed, 1 skipped; 1644 tests passed, 2 skipped) are all green.

Criteria

  • Each mode sets or clears the attribute for pinned, unpinned and no active thread: met. composer-footer.test.ts has an 11-row table, a switch from pinned to unpinned and back, and an unmount test. The red run is recorded at 2d0e5da.
  • The stylesheet is added once and the disposer removes it: met. mountComposerFooterStylesheet reuses an existing style[data-wizbar-composer-footer-style], and its disposer removes the node. The SDK says generations never overlap, so sharing one node is safe.
  • The attribute is cleared on unmount: met. A separate effect with empty dependencies clears it, and the attribute effect clears it when the active thread is unpinned or missing.
  • 0.6 and 0.7 settings reload unchanged and composerFooter starts at show: met. settings.test.ts adds a 0.7-shaped store reload. The upgrade-050 and upgrade-060 snapshots only gain composerFooter: "show". Unknown or wrong-typed values read as show.
  • CLI parity: met. wizbar footer <show|pinned|all> [--json] saves the setting, survives a reload, rejects a bad or missing mode with a usage error (exit 2), and is in the command list with [--json].
  • Scope: the only rule is html[data-wizbar-hide-composer-footer] [data-follow-up-composer-footer] { display: none }. Both attributes belong to WizBar or the host, so the rule cannot hide anything else. If the host drops its attribute, the rule matches nothing.

Findings

  • R1 (polish): wizbar/src/ThreadInbox.tsx:83-89. In "Hide on pinned threads" mode, activeThread is null until useSidebarThreads() is ready. So on app start or reload with a pinned thread open, the bar shows and then disappears. Fix: skip the sync while status !== "ready", so the attribute keeps its last value. Add a test that renders with status: "loading" and then ready.
  • R2 (polish): wizbar/src/ThreadInbox.tsx:87-89. The setting only works while WizBar's thread list is mounted. If the host unmounts the thread list (for example a closed mobile drawer or a collapsed sidebar), the unmount cleanup clears the attribute and the bar comes back. I could not confirm how the host behaves here. Fix: confirm it in the host. If the list does unmount, move the logic into the content script and read the active thread and setting from there. Or say in the settings note that it applies while WizBar's thread list is shown.
  • R3 (polish): wizbar/src/SettingsPage.tsx:141-169. The <label> wraps the description and the host note, but aria-label sets the name, so screen readers never hear either line. Fix: give the two spans ids and set aria-describedby on the <select>.
  • R4 (polish): wizbar/src/command.ts:211. The plain-text output is the raw key and value (composerFooter: pinned). Fix: print the same words as the settings page, for example Composer footer: Hide on pinned threads, and keep --json as it is.

Verdict: approve

@jparker2006
jparker2006 merged commit 014d327 into main Nov 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WizBar F1: option to hide the bar under the composer

1 participant