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

Palette entries can live beside their screen: cloud, domains and owner move out of src/tui/forge.ts #7737

Merged opened this

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

Merged

The palette entries for cloud, domains and owner now live beside their screens. `forgeCommands` builds them from one list instead of three hand-written pushes. `bun x tsc --noEmit` is clean and `test/palette-roster.test.ts` passes unchanged (4 tests). I did not run the wider suite, so the forge's check on this push is the first full run.

shipped production is serving it deploy 09671ca

opened this

The palette entries for cloud, domains and owner now live beside their screens. forgeCommands builds them from one list instead of three hand-written pushes. bun x tsc --noEmit is clean and test/palette-roster.test.ts passes unchanged (4 tests). I did not run the wider suite, so the forge's check on this push is the first full run.

  • New src/tui/screens/entries.ts: it exports the PaletteEntry type (id, title, hint, offered(session), run(session, ctx)) and ENTRIES = [cloud, domains, owner].
  • Screens: cloud.ts, domains.ts and owner.ts each export an entry with the same id, title, hint and admin/agent rules as before.
  • src/tui/forge.ts: one loop over ENTRIES sits where the three pushes were, so the order against the other entries is unchanged. The three screen imports are gone and it imports ENTRIES instead.
  • Import cycle: the screens import PaletteEntry from entries.ts as a type only, so nothing is loaded in a cycle. entries.ts imports the screens and forge.ts imports entries.ts.

I left everything else alone: no other palette entries moved, and no README, docs or formatter run. No dependencies were added.

To try it, open the terminal palette as an admin user. "Cloud accounts", "Failure domains" and "Owner's needs" should appear in the same place as before, and an agent session should not see the last two.

Closes #7731

commented

The palette entries for cloud, domains and owner now live beside their screens. forgeCommands builds them from one list instead of three hand-written pushes. bun x tsc --noEmit is clean and test/palette-roster.test.ts passes unchanged (4 tests). I did not run the wider suite, so the forge's check on this push is the first full run.

  • New src/tui/screens/entries.ts: it exports the PaletteEntry type (id, title, hint, offered(session), run(session, ctx)) and ENTRIES = [cloud, domains, owner].
  • Screens: cloud.ts, domains.ts and owner.ts each export an entry with the same id, title, hint and admin/agent rules as before.
  • src/tui/forge.ts: one loop over ENTRIES sits where the three pushes were, so the order against the other entries is unchanged. The three screen imports are gone and it imports ENTRIES instead.
  • Import cycle: the screens import PaletteEntry from entries.ts as a type only, so nothing is loaded in a cycle. entries.ts imports the screens and forge.ts imports entries.ts.

I left everything else alone: no other palette entries moved, and no README, docs or formatter run. No dependencies were added.

To try it, open the terminal palette as an admin user. "Cloud accounts", "Failure domains" and "Owner's needs" should appear in the same place as before, and an agent session should not see the last two.

Approved

Clean, behaviour-preserving refactor. Ids, titles, hints and the admin/agent gates are identical to the removed pushes, and the loop sits at the same position, so palette order is unchanged. The screens import PaletteEntry type-only, so there is no runtime cycle. test/palette-roster.test.ts pins the entries per session kind, and it covers this change. No auth surface is touched, there is no new dependency, and there is no dead code. The terminal gates are the same as before.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs