feat(mods): Replace the arcade with the orchestrator agents pane - #83
Merged
Merged
Conversation
4ndreello
marked this pull request as ready for review
September 15, 2026 12:40
Port the cc-arcade pattern into the codedeck plugin as an arcade mod: matcher-based /arcade command, AbovePrompt picker plus 2048 Client board, turn-complete pause banner, counter-only pet feeding from tool calls, and persisted best scores. Manifest declares the hooks module, open defaults CLAUDE_CODE_ENABLE_FUNCTION_HOOKS to 1 with user opt-out preserved, and docs describe enablement plus constraints. Co-Authored-By: Claude <noreply@anthropic.com>
Math.random draws flagged Sonar rule S2245 as vulnerabilities on new code and sank the Security Rating gate. Tile spawns and game picks now draw from a shared randomInt helper over getRandomValues, with a bounds test covering it. Co-Authored-By: Claude <noreply@anthropic.com>
Function hooks events only exist from 2.1.269 on, so the 2.1.258 pin rejects the modules declaration outright. Move the pin to the version this feature was probed against. Co-Authored-By: Claude <noreply@anthropic.com>
The arcade drew a game above the prompt. What the run actually needs there is the `codedeck web` canvas, so this deletes the arcade slice and puts an ASCII version of that canvas in a docked pane on the right: one card per agent of the current run, harness glyph, status and age, ordered by last touch, with a header counting sessions and a footer legend. The pane opens at session start when CODEDECK_RUN_ID is set, so a plain `claude --plugin-dir` session gets nothing rather than a permanently empty dock. It refreshes on turn.complete and on tool.call behind a 1.5s gap, and redraws only when the snapshot actually changed. A button above the prompt is the way back in. The pane can be closed by the engine's own close box, which fires no hook at all, so the module cannot track whether the pane is open; the button therefore only ever opens, never toggles, and there is no state to desync. It also re-syncs the flag /band reads. Removal and replacement land together because the previous register.tsx imports the arcade modules, so deleting them alone leaves a tree that cannot build. The pure layer never throws, because a throw inside a render hook drops the whole drawing, and it sizes itself from what the pane reports rather than from an assumed width. Co-Authored-By: Claude <noreply@anthropic.com>
Every rule here cost a live probe, and each one had already produced a wrong conclusion before it was pinned down. Box lays children out in a row, so a column of lines comes out shredded. A docked pane ignores the width you ask for and reports its own size back on every render. A Button's onPress is handed the press event, not the engine handle, though a handle captured from the render hook does work. A hotkey is swallowed by the prompt. A pane closed by its own close box fires no hook, so a module cannot track its open state. Also written down: how to click a button from a test, since the client turns on SGR mouse tracking and tmux can deliver a synthetic press and release. Co-Authored-By: Claude <noreply@anthropic.com>
The spec and run record for the arcade mod describe a feature the previous commit deletes. Leaving them beside the pane's own spec, which already records what replaced the arcade and why, gives the next reader two specs and only one implementation. Co-Authored-By: Claude <noreply@anthropic.com>
4ndreello
force-pushed
the
feat/arcade-mod-port
branch
from
September 20, 2026 02:06
634403e to
44b83cb
Compare
The mock existed to settle the pane's shape before any engine work, and the pane it was drawing is now implemented, tested and verified on screen. It also resolved the codedeck binary through PATH, which the security gate flags, and hardening a script with no remaining purpose is the wrong trade. Co-Authored-By: Claude <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Replace the arcade mod with an ASCII version of the
codedeck webcanvas, drawn in a docked pane on the right of the terminal.The arcade put a game above the prompt. What an orchestrator actually wants in that space is the canvas it already has in the browser: one card per agent of the current run, harness glyph, status and age, ordered by last touch, with a header counting sessions and a footer legend. The pane opens at session start when
CODEDECK_RUN_IDis set, so a plainclaude --plugin-dirsession gets nothing rather than a permanently empty dock that eats most of the screen. It refreshes onturn.completeand ontool.callbehind a 1.5s gap, and redraws only when the snapshot actually changed.A button above the prompt is the way back in after the pane is closed. It only ever opens, never toggles, because the pane can be closed by the engine's own close box and that fires no hook at all, so the module cannot track whether the pane is open. With nothing to desync there is nothing to get wrong.
/bandstill toggles from the keyboard, and the button re-syncs the flag it reads.Removal and replacement land in one commit on purpose: the previous
register.tsximports the arcade modules, so a commit that only deletes them leaves a tree that cannot build.Where the risk is, for review
plugin/mods/agents/pane.tsis pure and must never throw, because a throw inside a render hook drops the entire drawing. It sizes itself from what the pane reports (bodyColumns,scroll.bodyRows) rather than from an assumed width, since a width requested on$.ui.openis ignored.plugin/hooks/register.tsxis the only file that touches the engine. Theui.presshook, not the button'sonPress, does the work:onPressis handed the press event rather than the engine handle.Engine contract
docs/mods.mdgains the rules this feature had to learn, each one after a wrong conclusion that a live probe corrected:Boxlays children out in a row; a docked pane reports its own size and ignores the one you ask for;onPressreceives the press event, though a handle captured from the render hook does work; ahotkeyis swallowed by the prompt; a pane closed by its own close box is invisible to the module.scripts/pane-probe.shgrades a live drawing under tmux with four named assertions. It exists because grepping a PTY byte stream cannot read a dock, which repaints in place, and that instrument produced a confident false negative before it was replaced.