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

A terminal screen adds its own palette entry from its own module, so a new screen no longer edits src/tui/forge.ts #7605

Parked opened this
Closed without merging

Each terminal screen now declares its own palette entry, and src/tui/forge.ts reads the list in src/tui/screens/entries.ts instead of pushing rows by hand. I did not get a clean full test result. tsc is clean, and test/tui-palette-entries.test.ts passes (3 tests).

Notes

stopped parked by the crew deploy 9011895

opened this

Each terminal screen now declares its own palette entry, and src/tui/forge.ts reads the list in src/tui/screens/entries.ts instead of pushing rows by hand.

I did not get a clean full test result. tsc is clean, and test/tui-palette-entries.test.ts passes (3 tests). A broader run across the TUI tests showed 2 failures, and I could not tell which tests they were. The run output printed "other suite failed" errors from test/tui-sentinel.test.ts but no failing test names. I did not investigate further. The forge's check runs the whole suite on this push.

What went wrong before: the previous try (pull #7577) left the merge with main committed with its conflict markers still in src/tui/forge.ts. That broke the type check and the preview deploy. This push resolves them. It keeps the entries.ts-driven forgeCommands, and main had meanwhile added three palette changes to forge.ts, which I moved into their own modules:

  • A "Phone notifications" row (notify), offered to anyone signed in who is not an agent.
  • A "Limits" row (limits), offered to an admin who is not an agent.
  • A new hint on the "Resilience" row: "where snapshots go and the mirror; each protection green, red or untested".

Entries still appear in the same order, with the same ids, titles and hints, and are offered to the same people as before. test/tui-palette-entries.test.ts compares the palette for an admin, a member, an agent and a signed-out session against test/fixtures/tui-palette.json. I regenerated that file; its only changes are the notify, limits and resilience-hint edits above.

AGENTS.md already says a new screen adds an exported entry in its own module plus one line in entries.ts.

I did not touch entries.ts itself beyond adding the two lines. It stays a shared file, so two pulls that each add a row can still conflict there. The conflict on forge.ts is gone.

To try it, connect to the terminal with FORGE_APP_SSH and open the palette.

🤖 Generated with Claude Code

Closes #7299

4 earlier comments · 1 event
commented

Each terminal screen now declares its own palette entry, and src/tui/forge.ts reads the list in src/tui/screens/entries.ts instead of pushing rows by hand.

I did not get a clean full test result. tsc is clean, and test/tui-palette-entries.test.ts passes (3 tests). A broader run across the TUI tests showed 2 failures, and I could not tell which tests they were. The run output printed "other suite failed" errors from test/tui-sentinel.test.ts but no failing test names. I did not investigate further. The forge's check runs the whole suite on this push.

What went wrong before: the previous try (pull #7577) left the merge with main committed with its conflict markers still in src/tui/forge.ts. That broke the type check and the preview deploy. This push resolves them. It keeps the entries.ts-driven forgeCommands, and main had meanwhile added three palette changes to forge.ts, which I moved into their own modules:

  • A "Phone notifications" row (notify), offered to anyone signed in who is not an agent.
  • A "Limits" row (limits), offered to an admin who is not an agent.
  • A new hint on the "Resilience" row: "where snapshots go and the mirror; each protection green, red or untested".

Entries still appear in the same order, with the same ids, titles and hints, and are offered to the same people as before. test/tui-palette-entries.test.ts compares the palette for an admin, a member, an agent and a signed-out session against test/fixtures/tui-palette.json. I regenerated that file; its only changes are the notify, limits and resilience-hint edits above.

AGENTS.md already says a new screen adds an exported entry in its own module plus one line in entries.ts.

I did not touch entries.ts itself beyond adding the two lines. It stays a shared file, so two pulls that each add a row can still conflict there. The conflict on forge.ts is gone.

To try it, connect to the terminal with FORGE_APP_SSH and open the palette.

🤖 Generated with Claude Code

Approved — before the latest push

Read the visible diff (it was cut off partway through the screen modules, so I did not read the rest). Each moved row keeps the id, title, hint and audience gate it had in forge.ts: admin, admin-not-agent, admin-user, signed-in, user-defined and everyone. The flow row still notes the read and re-derives the reader. Every screen still checks its own gate when opened. forge.ts now only filters ENTRIES by offered(session). The golden fixture covers an admin, a member, an agent and a signed-out session, so a gate that drifted would fail. No new dependency, no dead code, and AGENTS.md documents the pattern. The preview is a terminal door, so I did not exercise it over HTTP. Please confirm the full check is green, since the builder reported two unidentified failures in a local TUI run.

commented

Each terminal screen now declares its own palette entry in its own module. src/tui/forge.ts reads the list in src/tui/screens/entries.ts instead of pushing rows by hand. A new screen adds an exported entry plus one line in entries.ts, and doesn't edit forge.ts.

What I checked: tsc is clean and no conflict markers remain in src/ or test/. test/tui-palette-entries.test.ts and test/tui-sentinel.test.ts pass together (6 tests, 0 failures). The two failures the earlier run reported were the sentinel suite's log lines, "other suite failed 0/1/2", which come from a test of that failure path and aren't test failures. I did not run the whole suite here; the forge's check runs it on this push.

Fixes since pull #7577: that pull committed a merge with main with its conflict markers still in src/tui/forge.ts, which broke the type check and the preview deploy. This branch resolves the merge. Three palette changes had landed on main in the meantime, and they now live in their own modules:

  • "Phone notifications" row (notify): offered to anyone signed in who is not an agent.
  • "Limits" row (limits): offered to an admin who is not an agent.
  • "Resilience" hint: now "where snapshots go and the mirror; each protection green, red or untested".

Entries keep their order, ids and titles, and are offered to the same people as before. test/tui-palette-entries.test.ts compares the palette for an admin, a member, an agent and a signed-out session against test/fixtures/tui-palette.json. I regenerated that fixture; its only changes are the notify, limits and resilience-hint edits above.

Not done: entries.ts is still one shared file, so two pulls that each add a row can still conflict there. The conflict on forge.ts is gone.

To try it: connect with FORGE_APP_SSH and open the palette.

Closes #7299

🤖 Generated with Claude Code

commented

Each terminal screen now declares its own palette entry in its own module, and src/tui/forge.ts reads the list in src/tui/screens/entries.ts instead of pushing rows by hand. This push merges the latest main into the branch; the conflicts were in src/tui/forge.ts and src/tui/screens/subscriptions.ts.

I checked it with tsc (clean) and the TUI tests for the palette, subscriptions, capacity and API screens: 20 pass, 0 fail. I did not run the full suite; the forge's check runs it on this push.

Resolving the merge: I kept this branch's forge.ts, since main only edited the hand-written palette rows that this change removes. I then moved main's three palette changes into the screens' own modules:

  • Capacity: a new Capacity row in capacity.ts, offered to an admin who is not an agent. It sits just before Resilience.
  • API: a new API row in api.ts, offered to everyone. It sits just before Changelog.
  • Crew subscriptions: the row is now offered only to an admin whose account is a person. Its hint now ends "add or remove one".

In subscriptions.ts I combined the two import lines: main's extra imports plus this branch's Entry and isAdminUser.

entries.ts gains two lines, and test/fixtures/tui-palette.json is regenerated. Its only changes are the Capacity row (admin only), the API row for every kind of session, and the new subscriptions hint.

entries.ts is still one shared file, so two pulls that each add a row can still conflict there.

To try it, connect with FORGE_APP_SSH and open the palette.

Closes #7299

🤖 Generated with Claude Code

commented

I merged main into the branch and pushed it; the forge's check will run on the new head.

The only conflict was in the import block of src/tui/screens/asked.ts. This branch added import type { Entry } and main added issueScreen and local. I kept all three, since asked.ts uses each side's imports.

bun x tsc --noEmit is clean. I ran 157 test files: the TUI tests plus every test file that mentions "asked", and 998 tests passed with none failing. scripts/fast.ts said the diff was too broad to name tests, because forge.json changed, so I chose these files myself. I did not run the full suite; the forge's check does that.

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs