Public: anyone can read this; the crew can change it.
The forge toolbar can move to the other side of the screen, and each app remembers the side #14568
Check · Review · Land · Live done — Landed and live in production.
The toolbar panel now has a "Move to the other side" button that swaps the toolbar between the left and right corners. The new tests, the toolbar byte-budget test and tsc pass. The existing toolbar-keyboard browser test was skipped here (no usable chromium), so the forge check is its first real run.
shipped production is serving it deploy 5b5da4d
5 earlier comments · 1 event
The toolbar panel now has a "Move to the other side" button that swaps the toolbar between the left and right corners. The new tests, the toolbar byte-budget test and tsc pass. The existing toolbar-keyboard browser test was skipped here (no usable chromium), so the forge check is its first real run.
- Already on main: dragging the pill, arrow keys and a
forge-pill-cornerlocalStorage setting were already there, and a bad stored value already fell back to bottom-right. What was missing was an explicit control, so I added only that. - The button: it sits in the panel's own flex box, so the pill doesn't change size. It keeps the current height (top or bottom) and flips only the side. It stores the result under the same key a drag does, and announces the move to screen readers ("Moved to the top right").
- Independent of dismiss (#14463): the side is its own localStorage key, and nothing here touches dismissing.
- Applied before paint: the stored corner is read and placed when the script boots, as before, and no layout code changed.
- Tests:
test/toolbar-swap.test.tscovers the default side, swapping and remembering it, a swap within a top corner, the stored side at boot, and a garbage stored value. - Test file name: the issue expected
test/toolbar-side.test.ts, but that name already holds an unrelated test (#6288), so I usedtoolbar-swap.test.ts.
To try it, open any app or preview, press the pill, and choose "Move to the other side". Reload and it stays there. I did not run the full suite; the forge's check does that on push.
The toolbar panel now has a "Move to the other side" button that swaps it between the left and right corners. It keeps its top or bottom height and remembers the side per app origin. The first push failed the "addition stays under 300 bytes" test, and I've fixed that and pushed again. I haven't seen the forge check's verdict on the new push yet.
- Cause: the first version of the button added about 550 bytes to the toolbar script, and
test/apps-toolbar-state.test.tscaps the addition at 300 bytes over its pinned baseline. Main alone was already 40 bytes over that baseline. - Fix: the button now reuses the arrow-key move through one shared function and the existing link style. The script is now 22,915 bytes, which is 292 over the baseline, so the pinned test passes without changing the baseline. The 24 KB toolbar budget test still passes.
- Tests: locally the swap, move, state, budget, size and camera toolbar tests pass (35 in total), and
tscis clean. I did not run the full suite. - Styling risk: the button borrows the link style plus
all:unsetand no longer has an underline, so it reads as plain text in the panel. I didn't check how it looks in a browser. - Existing behaviour kept: the stored side is still read and applied when the script starts. Dragging and arrow keys are unchanged, and nothing touches dismissing the toolbar (#14463).
The toolbar's panel now has a "Move to the other side" control that swaps left and right, and the choice is remembered per app origin. The change is in src/apps/toolbar.ts, with the swap tested in test/toolbar-swap.test.ts. It shares the keyboard move code so it fits inside the toolbar's 300-byte addition.
Check failure. The five failures sit in tests that don't touch the toolbar. They are the app strip's first-preview timing, the crew concurrency pick, the archive's stable URL, the sleeping-preview wake and the slow test step. Run alone here, test/web-apps.test.ts passes (29 tests), and so do the files holding the other four tests (28 tests in total). In the check log, the shard timings put the two slow tests at 120 s and 30 s, which fits a loaded machine. For the sleeping-preview test, the log says test/quotas-running.test.ts is red on main too, but that this one test passes on main. I could not run test/quotas-running.test.ts itself or reproduce that failure here. I made no code change for this failure; this push is an empty commit to re-run the check.
Not done. I did not touch the timing tests.
To try it. Open the preview at https://lab--14568--forge-trevato-apps.open-platform.sh, open the toolbar panel and choose "Move to the other side". The toolbar should switch sides and keep that side on reload.
The control works as designed: it sits in the panel so the fixed host does not shift, the button has a 44px touch target and a focus ring, the move is announced to screen readers, the side is stored under the existing per-origin key and independent of dismissal, and the tests cover default, swap, restore and bad value. One thing to fix: docs/features/forge-toolbar.md does not mention moving the toolbar at all (not the button, drag, arrow keys or the remembered side). Add a short "Moving the toolbar" section there covering the panel button, arrow keys, drag and the per-origin memory. Nothing else is blocking. After that, next: (1) check the button in a real browser at 360px, because the pull says its look was not verified; (2) add a test that the panel button is keyboard-focusable and reachable after the close button.
The forge toolbar's panel has a "Move to the other side" button, and the side is remembered per app origin. This push adds the how-to docs and a tab-order test. I did not check the button in a real browser at 360px.
What changed
docs/features/forge-toolbar.mdhas a new "Moving the toolbar" section. It covers the panel button, arrow keys, drag, the per-origin memory (forge-pill-corner, independent of dismissal), the fallback to bottom-right on a bad stored value, and the screen-reader announcement.test/toolbar-swap.test.tshas a new test that the swap button is a real, enabledbuttonwith notabindex. It also asserts the button comes after the Close button in the panel's order.bun test test/toolbar-swap.test.ts test/toolbar-budget.test.ts,bun scripts/gate.ts --fixandbun x tsc --noEmitall passed before the push.
Not done
- 360px check: the sandbox cannot run a real browser against the preview. Please look at the preview at 360px. The button's styling is the panel's shared link style, and the panel opens toward the inside of the screen.
- Drag in the docs: I wrote the docs' drag line as "snaps to the nearest corner" without re-reading the drag handler's snapping code. I only confirmed from the source header (
src/apps/toolbar.tsline 8) that dragging is a supported way to move the pill, so check that line against the real behaviour. - Release hold: the hold on the desk ("production is rolling, hold changes to it until it settles") did not touch this change. This push is to the pull branch only.
Try it
- Open the preview and click the pill, then "Move to the other side". The pill jumps to the left and the choice survives a reload.
- With the pill focused, press the arrow keys to move it between corners.
- Tab through the open panel. Close comes before the move button.
[{"go":"https://lab--14568--forge-trevato-apps.open-platform.sh","look":"Open the pill's panel at 360px width and Tab to the end","expect":"Close, then 'Move to the other side', both with a visible focus ring and 44px-high targets; activating it moves the pill to the left and a reload keeps it there"}]
🤖 Generated with Claude Code
Gate rewrapped a comment and I committed it with add -A, so it's in the push.
What changed: the only red this pull caused was "the addition stays under 300 bytes" in test/apps-toolbar-state.test.ts. Main's tell-box draft persistence (#14712) added about 270 bytes to the toolbar script. The side swap adds about 270 more. Each fits under 300 against the old pinned base (22623), but together they come to 547. I merged main and re-pinned the base to 22896, which is the script's size with #14712 and without the swap. The swap's own addition is therefore measured on its own again, and toolbar-budget, toolbar-swap, toolbar-keyboard and apps-toolbar-state pass here.
Where the 22896 comes from: I computed it from the size of the #14712 diff (273 bytes) rather than building main's script on its own, because that attempt failed on a circular import. If the test is still over 300 in the check, the base is off by a few bytes. The fix would be to re-pin it exactly.
Other reds in the log:
- The check log says the budget, outbound-sweep,
<time>and fetch-timeout suites are red on main too (pages-budget,page-budget,llms-budget,outbound-sweep,time-element,fetch-timeout). I did not touch them. - The "second preview" failure in
quotas-running.test.tsis a deploy ENOENT on a runner path, with no shard-mates. It looks like load or the environment, not this change, and the sandbox skips it.
I merged origin/main into the branch, so the pull now carries main's recent commits.
I merged main into the branch and pushed; the pull now merges cleanly. The 31 toolbar test files I ran pass (219 pass, 5 skipped, 0 fail). bun x tsc --noEmit is clean and scripts/gate.ts --fix reported no changes. I did not run the full suite; the check does that on this push.
Both conflicts were against the 7-day "Hide for 7 days" dismissal that landed on main (#14463).
src/apps/toolbar.ts: the panel now has the "Move to the other side" button first, then "Hide for 7 days". The restoring tab and the hide request come from main untouched.test/apps-toolbar-state.test.ts: I took main's size pin (base 22918 plus a named 1150-byte allowance for the dismissal), replacing my earlier re-pin of 22896. The side swap adds about 270 bytes on top of that, under the 300-byte limit.
Five toolbar tests were skipped: the pill keyboard test in test/toolbar-keyboard.test.ts could not run because no Chromium starts in this sandbox.
Earlier asks are met: the how-to is in docs/features/forge-toolbar.md (not the README), the tab-order test is in, and the drag line in the docs matches the drop handler, which snaps to the nearest corner by half-screen. The control sits in the panel, so the pill does not resize. The side is stored under its own key, separate from dismissal, and a bad stored value falls back to bottom-right. Not verified: how the button looks at 360px in a real browser; the keyboard browser test was skipped here.
Next, both non-blocking:
- Non-blocking: give the swap button a visible affordance, since it borrows the link style with no underline and reads as plain text.
- Non-blocking: check the 44px target and the focus ring at 360px in a browser.
The toolbar panel now has a "Move to the other side" button that swaps the toolbar between the left and right corners. The new tests, the toolbar byte-budget test and
tscpass. The existing toolbar-keyboard browser test was skipped here (no usable chromium), so the forge check is its first real run.forge-pill-cornerlocalStorage setting were already there, and a bad stored value already fell back to bottom-right. What was missing was an explicit control, so I added only that.test/toolbar-swap.test.tscovers the default side, swapping and remembering it, a swap within a top corner, the stored side at boot, and a garbage stored value.test/toolbar-side.test.ts, but that name already holds an unrelated test (#6288), so I usedtoolbar-swap.test.ts.To try it, open any app or preview, press the pill, and choose "Move to the other side". Reload and it stays there. I did not run the full suite; the forge's check does that on push.
Closes #14565