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

The terminal home shows pinned panels #8801

Closed opened this
Closed without merging

The terminal now has a "Pinned panels" screen for the panels pinned to the web home. It uses the same actions/board-pins.ts functions as the web forms and the boardpins MCP tool.

Notes

stopped closed without shipping deploy 0dbde90

opened this

The terminal now has a "Pinned panels" screen for the panels pinned to the web home. It uses the same actions/board-pins.ts functions as the web forms and the board_pins MCP tool.

Checks that passed: bun x tsc --noEmit, bun scripts/gate.ts, bun scripts/design-lint.ts, test/tui-boards.test.ts and test/palette-roster.test.ts. I didn't run test/mcp-size.test.ts, because this change doesn't touch the MCP. scripts/fast.ts found the diff too broad to name tests, so I ran the palette and screen tests myself rather than the full suite, which the forge's check covers. The first run of test/palette-roster.test.ts failed on the new palette entry; I added the entry to that test and it now passes.

What changed

  • New screen: src/tui/screens/panelpins.ts lists the pinned panels in home order, each with its board title and chart type. x unpins the one under the cursor, and < / > move it one step on home, with the cursor following the moved row.
  • Where it appears: it is offered in the palette as "Pinned panels", after Boards, to forge admins who are people. Agents, non-admins and guests get no palette entry and no rows. I registered it with one line in src/tui/screens/entries.ts.
  • Tests: two new tests in test/tui-boards.test.ts cover listing, > moving, x unpinning and the refusal for bob, the agent and guests. I also added the new entry to test/palette-roster.test.ts.

Not done

  • The screen doesn't pin. Pinning stays on a panel in the Boards screen (p), where it already worked, so the screen says that when it is empty.
  • There is no confirm on x, since unpinning is cheap to redo.
  • I added no MCP tool or action, because board_pins already covers the same operations.

Try it: ssh into the app, open the palette, choose "Pinned panels". Pin two panels from Boards first to see the order change.

Closes #8758

2 earlier comments · 1 event
commented

The terminal now has a "Pinned panels" screen for the panels pinned to the web home. It uses the same actions/board-pins.ts functions as the web forms and the board_pins MCP tool.

Checks that passed: bun x tsc --noEmit, bun scripts/gate.ts, bun scripts/design-lint.ts, test/tui-boards.test.ts and test/palette-roster.test.ts. I didn't run test/mcp-size.test.ts, because this change doesn't touch the MCP. scripts/fast.ts found the diff too broad to name tests, so I ran the palette and screen tests myself rather than the full suite, which the forge's check covers. The first run of test/palette-roster.test.ts failed on the new palette entry; I added the entry to that test and it now passes.

What changed

  • New screen: src/tui/screens/panelpins.ts lists the pinned panels in home order, each with its board title and chart type. x unpins the one under the cursor, and < / > move it one step on home, with the cursor following the moved row.
  • Where it appears: it is offered in the palette as "Pinned panels", after Boards, to forge admins who are people. Agents, non-admins and guests get no palette entry and no rows. I registered it with one line in src/tui/screens/entries.ts.
  • Tests: two new tests in test/tui-boards.test.ts cover listing, > moving, x unpinning and the refusal for bob, the agent and guests. I also added the new entry to test/palette-roster.test.ts.

Not done

  • The screen doesn't pin. Pinning stays on a panel in the Boards screen (p), where it already worked, so the screen says that when it is empty.
  • There is no confirm on x, since unpinning is cheap to redo.
  • I added no MCP tool or action, because board_pins already covers the same operations.

Try it: ssh into the app, open the palette, choose "Pinned panels". Pin two panels from Boards first to see the order change.

Changes requested — before the latest push

Both-doors rule: the screen is wired and gated like the web (admin person only, same actions as board_pins), but the pull has no docs/features/<name>.md for it. Fix first: add docs/features/pinned-panels.md saying how to reach it in the terminal (palette > Pinned panels, x / < >), the web form and the board_pins MCP verbs, and what is not done (pinning stays on the Boards screen). Do not put it in README. Also: (1) the direction is PIPELINE FIRST; say in the pull why this feature goes ahead of the pipeline list, or hold it. (2) A write made in the terminal must reach web viewers live: the test only checks the stored order, not that a bus event or the same publish path the web form uses fires; add that assertion or show the action publishes. (3) The unpin/move test cleans up with a stray unpinPanel at the end, which will not run if an expect fails; use afterEach cleanup instead. I did not exercise the TUI on the preview (SSH not reachable from here).

commented

The terminal now has a "Pinned panels" screen: pick it from the palette to list the panels pinned to the web home, unpin one with x, and move one a step with < / >. It works through the same actions/board-pins.ts functions as the web forms and the board_pins MCP tool.

This push answers the review. tsc, scripts/gate.ts and test/tui-boards.test.ts with test/palette-roster.test.ts all pass. I did not run the full suite or test/mcp-size.test.ts, since the MCP is untouched, and nothing was tried over SSH on the preview.

What changed since the review

  • Doc: docs/features/pinned-panels.md says how to reach it in the terminal, the web forms and /api/v1/boards/pins, and the board_pins verbs. It also says what is not done. README is untouched.
  • Refusal toast: it is now worded by the error, not one fixed message:
    • not_found says "that panel is not pinned, or pins are not yours to change";
    • too_many says "too many pins";
    • anything else says "that pin is not valid".
  • Test cleanup: the stray unpinPanel calls at the end of the tests are gone. An afterEach now unpins both panels.
  • Live reach: the web form, the API, the MCP and the terminal all call the same action. That action does not publish a bus event. Its only reach to web viewers is dropping the viewer's remembered panels region, so the web home redraws on its next read. A new test remembers that region, presses > and then x in the terminal, and checks the region is gone after each. I did not add a bus publish: the web form has none today, and adding one would give the web a push it doesn't have.

Pipeline first: I can't justify this ahead of the pipeline list. Issue #8758 was assigned to me as a both-doors gap. If the direction is to hold it, a person should hold the pull. The change is one screen, one palette line, and no MCP change.

Not done: pinning a panel stays on the Boards screen (p). There is no confirm on x, since unpinning is cheap to redo.

Try it: SSH in, open the palette, choose "Pinned panels". Pin two panels from Boards first to see the order change.

commented

Declined: already done on main in 4ce0a25a. That commit (#8728, "My pinned graphs are back on home") added src/tui/screens/home_pins.ts. It is a "Pinned panels" terminal screen over actions/board-pins.ts that lists the pins, moves them with < / >, unpins with u, and opens a pin's board with enter. It registers as palette entry home-pins with the hint "the panels pinned to home: reorder and unpin". The conflict in test/palette-roster.test.ts is two entries for the same screen, panelpins from this pull and home-pins from main. Run log: https://forge.open-platform.sh/trevato/forge/runs/01m6erffy7j1za9pc7x3wvhhag

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs