Public: anyone can read this; the crew can change it.

Any /boards panel can be pinned to home, and pinned panels show under the KPIs in the owner's order #2913

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Every panel on a board page now has Pin to home and Unpin, and home draws your pinned panels under the KPI row in your own order. The new pin tests and the neighbouring boards, home KPI row and migration tests pass.

Notes

opened this

Every panel on a board page now has Pin to home and Unpin, and home draws your pinned panels under the KPI row in your own order. The new pin tests and the neighbouring boards, home KPI row and migration tests pass. I couldn't run the type check, because bun install and bun x tsc fail in the sandbox with a read-only tempdir error. The forge's check will be the first type check of this change.

What changed

  • Storage: a new board_pin table (migration 20261019180000-board-pins) holds each owner's pins as board slug, panel title and position. src/boards/pins.ts is the only code that touches it, and every query is keyed by the signed-in user's own id.
  • Routes: POST /boards/pin-panel, /boards/unpin-panel and /boards/move-pin (in boards-edit.ts) check the origin, require an admin who is a person, and validate the slug and title. Pinning also checks that the panel exists on that board, and a person can hold at most 24 pins.
  • Home: web/studio/pinned.ts renders the panels with the board page's own panel drawing. Each panel has Up, Down and Unpin. This only shows for admins on the full home, where the KPI row shows. Home does no extra work when you have no pins.
  • Tests: test/board-pins.test.ts covers:
    • pinning shows the panel on home, in order, and pinning twice changes nothing;
    • moving and unpinning change the order and remove the panel;
    • another admin's pins never show, and they can't unpin yours;
    • cross-origin, non-admin, unknown-panel and bad-slug requests are refused;
    • a pin whose panel has gone is skipped.
  • README: the Boards paragraph now describes pinning.

Left out

  • Pin key: a pin is keyed by board slug and panel title, not by position, so moving or removing other panels doesn't shift it. Renaming a panel, or deleting its board, silently drops its pin from home, and the pin row stays.
  • Duplicate titles: two panels with the same title on one board count as one pin.
  • Drag to reorder: order changes through Up and Down buttons, not dragging.

Try it Sign in as an admin and open /boards/<slug>. Press Pin to home on a panel, then open / and use Up, Down or Unpin there.

Closes #2741

4 earlier comments · 1 event
commented

Every panel on a board page now has Pin to home and Unpin, and home draws your pinned panels under the KPI row in your own order. The new pin tests and the neighbouring boards, home KPI row and migration tests pass. I couldn't run the type check, because bun install and bun x tsc fail in the sandbox with a read-only tempdir error. The forge's check will be the first type check of this change.

What changed

  • Storage: a new board_pin table (migration 20261019180000-board-pins) holds each owner's pins as board slug, panel title and position. src/boards/pins.ts is the only code that touches it, and every query is keyed by the signed-in user's own id.
  • Routes: POST /boards/pin-panel, /boards/unpin-panel and /boards/move-pin (in boards-edit.ts) check the origin, require an admin who is a person, and validate the slug and title. Pinning also checks that the panel exists on that board, and a person can hold at most 24 pins.
  • Home: web/studio/pinned.ts renders the panels with the board page's own panel drawing. Each panel has Up, Down and Unpin. This only shows for admins on the full home, where the KPI row shows. Home does no extra work when you have no pins.
  • Tests: test/board-pins.test.ts covers:
    • pinning shows the panel on home, in order, and pinning twice changes nothing;
    • moving and unpinning change the order and remove the panel;
    • another admin's pins never show, and they can't unpin yours;
    • cross-origin, non-admin, unknown-panel and bad-slug requests are refused;
    • a pin whose panel has gone is skipped.
  • README: the Boards paragraph now describes pinning.

Left out

  • Pin key: a pin is keyed by board slug and panel title, not by position, so moving or removing other panels doesn't shift it. Renaming a panel, or deleting its board, silently drops its pin from home, and the pin row stays.
  • Duplicate titles: two panels with the same title on one board count as one pin.
  • Drag to reorder: order changes through Up and Down buttons, not dragging.

Try it Sign in as an admin and open /boards/<slug>. Press Pin to home on a panel, then open / and use Up, Down or Unpin there.

commented

Both of sentinel's points are fixed and pushed. The type check still won't run in the sandbox (bun x tsc hits the read-only tempdir error), so the forge's check is the first one. The pin, terminal, board, MCP, home and dashboard tests pass.

All doors

  • src/actions/board-pins.ts now holds pin, unpin, move and list, gated like showBoard: an admin who is a person, and anyone else gets not_found.
  • The web pinPost is now a thin caller of that action.
  • Terminal: on a board's screen, [ and ] mark a panel, p pins or unpins it, and < and > move a pinned one. The dashboard shows a Pinned: title (board) line for an admin.
  • API: GET /api/v1/boards/pins lists in order. POST /api/v1/boards/pins takes {op: pin|unpin|move, slug, title, by}.
  • MCP: a new board_pins tool lists with no op and changes pins with one.
  • pins is now reserved as a board slug so the API route can't clash with a board.
  • The README has a section for each door.

Pins you can't see A pin now counts toward the 24-pin limit only while its panel still exists. Pinning first drops that person's pins whose board was deleted or panel renamed. A new test fills the limit, deletes the board, and pins again. It also renames a panel and pins the new title.

Smaller points

  • boardShow no longer uses ctx.auth.user!. It reads the user with ?.id ?? "".
  • I imported the new listPinned into api.ts and mcp.ts as listPinnedPanels, because api.ts already has an unrelated listPinned for repo pins.

Tests

  • tui-boards.test.ts: a terminal key pins a panel, the dashboard lists it, and the key again unpins it. Another admin can't see it, and a non-admin can't pin from the terminal.
  • board-pins.test.ts: the API paths for list, pin, move, unpin and refusals.
  • mcp.test.ts: the tool list now includes board_pins.
  • I did not add a test that calls the board_pins tool. It shares the action with the API path, which is tested.

Disagreement Pins are still keyed by board slug and panel title, so renaming a panel drops its pin from home. Re-pin it under the new title.

commented

I merged main into this branch and pushed it. The only conflict was in README.md, in the paragraph on the starter boards.

I kept both sides: the pin documentation from this branch, and main's wording that the first boot writes seven starter boards, with Forges added. The merge touched src/http/api.ts, src/http/mcp.ts, src/http/server.ts and src/tui/screens/dashboard.ts. Git combined those without conflicts, and I did not read the merged code.

  • Pin and board tests: all 223 pass.
  • Full bun test in the sandbox: six tests fail, none of them in pin or board code:
    • the native-checker audit
    • the terminal-layout floor
    • the scaffolded-app typecheck
    • the SSH-port-taken test
    • hollow.ts
    • the Chromium capture

    Most look tied to what this sandbox lacks (no network, no Chromium, a read-only temp directory). I did not confirm they fail the same way on main, so the forge's check on this push is the real verdict.

  • tsc --noEmit: I started it but its output didn't come back, so I can't report a result.
commented

I addressed Sentinel's review and pushed it to the branch. The 255 board, pin, MCP and terminal-board tests pass. I couldn't run tsc --noEmit here because bun can't write to its temp directory in this sandbox, so the forge's check is the first type check of these edits.

Changes

  • Move on an unpinned panel: movePinned returns not_found when the panel isn't in the owner's pins. The page, the API, MCP and the terminal now report that instead of success. The terminal toasts "that panel is not pinned". A move that has nowhere to go at either end stays a silent no-op.
  • MCP board_pins: a new test in test/mcp.test.ts runs list (empty), pin, list, move, a move or pin of a panel that doesn't exist (not_found), unpin and list again. It also checks that an agent's token and a non-admin are refused. Each case would fail if run() were emptied.
  • Terminal < / >: a new test in test/tui-boards.test.ts presses > and < on pinned panels and checks the home order. It also checks that > on an unpinned panel doesn't toast "moved on home" and that < at the top leaves the order alone.
  • Sanitiser: plain in tui/screens/boards.ts is now exported and dashboard.ts uses it. The second copy and its eslint-disable are gone.

Reserved slug: pins is now reserved as a board slug, so a board already saved as pins.json would stop being readable and drop out of /boards. I couldn't look at the forge's boards from here, so I didn't check whether one exists. A person should look before merging.

To try it, sign in as an admin, pin two panels from /boards/:slug, and reorder them on home.

the crew's run was interrupted: restart, resumes on the next pass — cancelled
commented

I merged main into this branch and pushed it. There were no conflicts. The merge only added 42 lines to src/core/releases.json, and none of the pin-to-home code changed.

I didn't see a result from the local checks. The full bun test run didn't finish within my time limit and was still running in the background when I pushed. I don't know whether bun x tsc --noEmit passed: its output was lost in the same timed-out command. The forge's check on this push is the first full verdict. The sandbox also blocked some test requests to *.forge.test.

The pull itself is unchanged: any boards panel can be pinned to Home.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs