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

Home: two or three owner-pinned panels with release annotations #16884

Merged opened this

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

Merged

Most of this was already on main, so the change is small: home pins are now capped at three, and each pinned panel has an Open board link. The pins tests (web, API and MCP, terminal) pass, and tsc, the design lint and the docs-index tests are clean. I did not run the full suite or open the page.

Notes

opened this

Most of this was already on main, so the change is small: home pins are now capped at three, and each pinned panel has an Open board link. The pins tests (web, API and MCP, terminal) pass, and tsc, the design lint and the docs-index tests are clean. I did not run the full suite or open the page.

Already there (#2913, #3694):

  • The owner's pins are stored per user in board_pin, and the board and panel are checked against the boards registry.
  • Pin changes are same-origin form posts.
  • Home draws each pinned panel with the release marks.
  • The terminal screen (src/tui/screens/home_pins.ts), the API and the MCP tool already exist.

Changed:

  • Cap: MAX_PINS goes from 24 to 3 in src/boards/pins.ts. A fourth pin is refused as too_many, on the web, in the terminal, over the API and over MCP. Pins above three that were made earlier stay stored, and home still draws them until one is unpinned.
  • Link: src/web/studio/pinned.ts adds Open board beside Up, Down and Unpin. It goes to /boards/<slug>, which uses the board's own range.
  • Same range: a pinned panel is drawn over its board's range. The link carries no range parameter, so the board opens over that range.
  • Docs and test: docs/features/home-pins.md is new, and test/board-pins.test.ts checks the cap and the link.

Left out:

  • No per-pin range override.
  • No automatic trim of existing pins above three.
  • No new test for release marks on home, since that behaviour was already there.
  • I added no function, so there was nothing from similar.ts to reuse.

Try it: sign in as the owner, pin a panel from /boards, open /, and use Open board under its chart. Pin a fourth and it is refused.

Review:

[
  {"go": "/boards", "look": "Pin three panels, then a fourth", "expect": "the fourth is refused with 'too many'"},
  {"go": "/", "look": "Pinned panels under the KPI row", "expect": "release marks on each time chart, and Open board beside Up, Down and Unpin"},
  {"go": "/", "look": "Click Open board on a pinned panel", "expect": "its board opens over the same range as the chart on home"}
]

The first push was refused for lacking a Try: line, so the branch has an empty Try: commit. The forge opens the pull itself.

Closes #16850

7 earlier comments
commented

Most of this was already on main, so the change is small: home pins are now capped at three, and each pinned panel has an Open board link. The pins tests (web, API and MCP, terminal) pass, and tsc, the design lint and the docs-index tests are clean. I did not run the full suite or open the page.

Already there (#2913, #3694):

  • The owner's pins are stored per user in board_pin, and the board and panel are checked against the boards registry.
  • Pin changes are same-origin form posts.
  • Home draws each pinned panel with the release marks.
  • The terminal screen (src/tui/screens/home_pins.ts), the API and the MCP tool already exist.

Changed:

  • Cap: MAX_PINS goes from 24 to 3 in src/boards/pins.ts. A fourth pin is refused as too_many, on the web, in the terminal, over the API and over MCP. Pins above three that were made earlier stay stored, and home still draws them until one is unpinned.
  • Link: src/web/studio/pinned.ts adds Open board beside Up, Down and Unpin. It goes to /boards/<slug>, which uses the board's own range.
  • Same range: a pinned panel is drawn over its board's range. The link carries no range parameter, so the board opens over that range.
  • Docs and test: docs/features/home-pins.md is new, and test/board-pins.test.ts checks the cap and the link.

Left out:

  • No per-pin range override.
  • No automatic trim of existing pins above three.
  • No new test for release marks on home, since that behaviour was already there.
  • I added no function, so there was nothing from similar.ts to reuse.

Try it: sign in as the owner, pin a panel from /boards, open /, and use Open board under its chart. Pin a fourth and it is refused.

Review:

[
  {"go": "/boards", "look": "Pin three panels, then a fourth", "expect": "the fourth is refused with 'too many'"},
  {"go": "/", "look": "Pinned panels under the KPI row", "expect": "release marks on each time chart, and Open board beside Up, Down and Unpin"},
  {"go": "/", "look": "Click Open board on a pinned panel", "expect": "its board opens over the same range as the chart on home"}
]

The first push was refused for lacking a Try: line, so the branch has an empty Try: commit. The forge opens the pull itself.

commented

<!-- look-pages 76e7fcca1890 --> Look pages for 76e7fcc, from the gate:

  • look pages (inferred): this pull changes src/web/studio/pinned.ts; the forge pictures / (src/web/studio/pinned.ts), /docs (src/web/studio/pinned.ts), /explore (src/web/studio/pinned.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

Home now shows at most three owner-pinned panels, and each panel has an Open board link under its chart. The branch is pushed and I changed nothing in response to this feedback.

The gate's comment is an inferred list of look pages for 76e7fcc: /, /docs, /explore and 28 more, picked because their routes import src/web/studio/pinned.ts. It names no defect, so there was nothing to fix. I did not add a Looks: or No look: line, because the inferred set covers the pages this change can affect.

To try it:

  1. Sign in as the owner.
  2. Pin a panel from /boards.
  3. Open / and use Open board under its chart.

I did not rerun the tests, type check or gate in this turn.

[
  {"go": "/boards", "look": "Pin a panel as the owner", "expect": "The panel is marked pinned"},
  {"go": "/", "look": "The pinned panels, at most three", "expect": "Each has an Open board link under its chart that goes to its board"}
]
commented

Home now draws only the first three pins, in their stored order, so "at most three panels" holds for people who pinned before the cap. test/board-pins.test.ts passes and tsc is clean. I ran no other suite, and the design lint ran only before the last edit.

  • The fix: src/web/studio/pinned.ts slices listed.value to MAX_PINS before drawing. Pins past the third stay stored and listed. They can be unpinned on /boards and in the terminal's Pinned panels screen.
  • Home test: a new test stores four pins directly in the database and expects exactly three panels on home.
  • Refusal test: the same test then tries a fourth pin through pinPanel and expects too_many. It runs as carol, an admin who can see the board. Her user object was created before the admin promotion, so the test spreads it with isAdmin: true.
  • Doc: docs/features/home-pins.md now says home shows the first three and names where the rest are listed and unpinned.

I left the phone-width wrapping of the row actions alone, as you said it's fine. The commit carries a No door: line, since this only trims what the web home draws and the terminal and API already list every pin.

[
  {"go": "/", "look": "An owner with four stored pins", "expect": "Only the first three panels are drawn, each with Open board"},
  {"go": "/boards", "look": "The fourth pinned panel", "expect": "It still shows as pinned and can be unpinned"}
]
commented

<!-- look-pages 34319d6cd743 --> Look pages for 34319d6, from the gate:

  • look pages (inferred): this pull changes src/web/studio/pinned.ts; the forge pictures / (src/web/studio/pinned.ts), /docs (src/web/studio/pinned.ts), /explore (src/web/studio/pinned.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

Home now draws at most three owner-pinned panels, each with an Open board link under its chart. The earlier commits already carry the change. This push adds one empty commit to answer the gate's notes.

The commit message now carries Direction: … (#16850) and Looks: /. It also keeps the No door: line, because the cap is applied on the page only. The terminal screen and API still list every pin.

I checked the four things the gate raised:

  • Both doors: gate --explain shows the both-doors rule satisfied, with the No door: reason.
  • Test input: the diff contains no as never.
  • Dead code: MAX_PINS is used in src/actions/board-pins.ts and src/web/studio/pinned.ts, and test/hollow.test.ts passes.
  • Comment width: gate --fix rewrapped nothing. The three over-wide comment lines are only a note, which the nightly rewrap handles on main.

tsc --noEmit is clean, and test/board-pins.test.ts and test/hollow.test.ts pass (37 tests).

What I left out: no way to see pins beyond the third on Home; they stay listed in /boards and in the terminal.

To try: sign in as the owner, pin a panel from /boards, open /, and use Open board under its chart.

[{"go":"/boards","look":"pin up to three panels; a fourth is refused with too_many","expect":"the fourth pin is not added"},{"go":"/","look":"the pinned panels as the owner","expect":"at most three, each with an Open board link under its chart"}]

🤖 Generated with Claude Code

commented

<!-- look-pages cae57f81e882 --> Look pages for cae57f8, from the gate:

  • look pages (named): this pull changes src/web/studio/pinned.ts; a commit names /
commented

The gate's note on cae57f8 is informational: look pages (named) only confirms that my Looks: / line was read, so I changed nothing and pushed nothing.

The four recurring refusals are already met on this branch:

  • Both doors: No door: explains why there's no terminal change. The cap is applied on the page only, and the terminal screen and API still list every pin.
  • Real test input: the diff has no as never, and tsc --noEmit is clean.
  • Issue named: the commits say (#16850) and Direction: … (#16850).
  • Dead code: the one new export, MAX_PINS, is used in src/actions/board-pins.ts and src/web/studio/pinned.ts. test/hollow.test.ts passes.

If a specific check fails on cae57f8, send me its log and I'll fix that.

Sign in to join this conversation.

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

Keyboard shortcuts

Docs