Repository navigation
feat(fork): hide developer controls by default on board hosts - #277
orbitingflea merged 2 commits into
Conversation
On a board host, Diff, Pull request, Linked items and Device drop out of the "+" menu and the empty-panel launcher until this browser or the machine's menu layer shows them. One built-in default set and one resolver serve both the menu and the Settings row's "Default" label. While the board-host role is still unknown, the built-in defaults apply with no machine layer, so the items do not show before it arrives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a board host the sidebar footer shows Pull requests and Issues only after this browser turns them on in Settings > General > Sidebar. The choice is a browser-local client setting with its own reset, offered in settings search on board hosts only, and left out of Restore defaults like the right panel menu choices. Off a board host the buttons follow upstream's support checks as before. The fork's search gate for board-host-only entries is renamed from rightPanelMenuOnly to boardHostOnly, since it now covers a sidebar row. The README and run-t3.md describe both defaults. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This PR changes the test suite by +5 test cases (browser +4, unit +1, server 0). New browser test files: Keep tests that would fail for a real reason, and test logic below the UI where it can be. See Testing. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosNo All 64 scenario measurements
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
Behaviour change
Behaviour change: yes, a board host (a server whose whiteboard config maps a hostname to "app") hides sidebar Pull requests, Issues, and four right panel items by default.
Why
Hide developer controls by default on board hosts so users who do not track pull requests or issues see less clutter.
What changed
+menu and launcher hide Diff, Pull request, Linked items, and Device by default, freeingD,P,L,M.Default (Hidden). Browser choices override machine and built-in defaults.Scope
Fork web modules, five upstream source files, and two docs. No server or data changes.
Tradeoffs
+menu and launcher items until then.Blast Radius
Whiteboard web builds only. Non-board hosts and Electron stay unchanged. Revert both commits.
Verification
check:changed, unit, and browser tests passed.361x662) checked defaults, enabling controls, reload, and a second profile. Not checked on Electron, Firefox, or Safari.Implementation and verification details
apps/web/src/fork/rightPanelMenu/menu.logic.tsaddsHIDDEN_BY_DEFAULTandhiddenByDefault(id, machine), shared by the menu resolver andRightPanelMenuSettings.tsx.rightPanelMenu.tsxapplies built-in defaults while the board-host role is"unknown". A saved browser choice that sets only a menu letter leaves the item hidden, and the letter returns when the item is shown.apps/web/src/fork/sidebarLinks/sidebarLinks.tsxaddsuseSidebarUtilityLinksandSidebarPullRequestsAndIssuesSetting, backed by browser-localsidebarPullRequestsAndIssuesShown(defaultfalse, never sent to the server) inpackages/contracts/src/settings.ts(5 lines added) and copy inapps/web/src/fork/forkCopy.ts.packages/contracts/src/settings.ts(5 added),SidebarChrome.tsx(2 added, 3 removed),SettingsPanels.tsx(2 added),settingsSearch.ts(6 added, 11 removed), anduseAvailableSettingsSearchItems.ts(3 added, 3 removed). The board-host search entries (right-panel-menuandsidebar-pull-requests-issues) live inapps/web/src/fork/boardHostSearch.ts(BOARD_HOST_SEARCH_ITEMS), spread intosettingsSearch.tson one line, with the gate renamed fromrightPanelMenuOnlytoboardHostOnly(hasRightPanelMenutoisBoardHost) and read throughuseIsBoardHostinapps/web/src/fork/whiteboard/role.ts.README.md("About this fork") andfork/whiteboard/run-t3.mddocument the defaults.check:changedpassed (format, lint, knip, typecheck, and tests of changed files). Unit tests covermenu.logic.test.tsandapps/web/src/fork/boardHostSearch.test.ts(board-host entries are offered only on a board host, and not when board-host availability is omitted). Browser tests coversidebarLinks.browser.test.tsx(hidden on a board host until toggled, shown off a board host with no setting row) andrightPanelMenu.browser.test.tsx(off, unknown, board host, and machine config showing Device).361x662) verified hidden defaults,Default (Hidden)rows, bringing every control back with the switch andShown, survival across reload, and defaults in a second browser profile. Desktop Electron is never a board host.