Repository navigation
feat(agents): add Freebuff launch and sidebar status support - #23567
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change adds Freebuff as a supported TUI agent, including launch configuration, detection, display assets, and documentation. It adds parsing for Freebuff terminal status screens and reports status updates from local headless PTYs. The relay projects status information into Freebuff PTY output. Tests cover launch behavior, detection, terminal status parsing, and relay output. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to Freebuff launch and sidebar status support have no established merge-blocking gap; the remote status path reaches the sidebar. The change is ready for normal repository checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The new status flow uses existing terminal and status-handling paths, and the review found no demonstrated expansion of access to another session. Some recovery and platform-specific behavior remains unverified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 27 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 56ce0d3f-ed82-4fad-af71-6115a643d99a
⛔ Files ignored due to path filters (1)
src/shared/agent-icons/freebuff.pngis excluded by!**/*.png
📒 Files selected for processing (43)
README.mdconfig/scripts/locale-translation-policy.mjsdocs/readme/README.es.mddocs/readme/README.fr.mddocs/readme/README.ja.mddocs/readme/README.ko.mddocs/readme/README.pt.mddocs/readme/README.zh-CN.mddocs/site/content/docs/agents/supported.mdxmobile/src/components/mobile-agent-icon-assets.tsmobile/src/tasks/mobile-tui-agents.tssrc/cli/index-worktree-create-freebuff.test.tssrc/main/ipc/freebuff-detection.test.tssrc/main/preflight/freebuff-remote-detection.test.tssrc/main/runtime/__fixtures__/freebuff-lifecycle.meta.jsonsrc/main/runtime/__fixtures__/freebuff-lifecycle.txtsrc/main/runtime/__fixtures__/freebuff-login.meta.jsonsrc/main/runtime/__fixtures__/freebuff-login.txtsrc/main/runtime/__fixtures__/freebuff-ready.meta.jsonsrc/main/runtime/__fixtures__/freebuff-ready.txtsrc/main/runtime/__fixtures__/freebuff-trust.meta.jsonsrc/main/runtime/__fixtures__/freebuff-trust.txtsrc/main/runtime/freebuff-status-transcript.test.tssrc/main/runtime/freebuff-terminal-status.tssrc/main/runtime/orca-runtime-maybe-hydrate-headless-from-renderer.tssrc/relay/freebuff-status-projection.test.tssrc/relay/freebuff-status-projection.tssrc/relay/pty-handler-output-streaming.test.tssrc/relay/pty-handler.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/lib/agent-catalog.tsxsrc/renderer/src/lib/agent-favicon-assets.tssrc/renderer/src/lib/agent-status.tssrc/shared/agent-kind.tssrc/shared/freebuff-launch.test.tssrc/shared/freebuff-screen-status.tssrc/shared/freebuff-startup.test.tssrc/shared/skills-cli-agent-keys.tssrc/shared/telemetry-property-schemas.tssrc/shared/tui-agent-config.tssrc/shared/tui-agent-display-names.tssrc/shared/tui-agent-selection.tssrc/shared/tui-agent.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Adds Freebuff as a first-class terminal agent and adds an execution-host status producer that reads Freebuff's composer and question panel from the headless terminal screen model and publishes into the canonical agent status store. Prompts use the existing stdin-after-start interactive path; Freebuff and Codebuff stay independent.
- Agent plumbing:
freebuffadded toTuiAgent,TUI_AGENT_CONFIG(detectCmd: 'freebuff',stdin-after-start),agent-kind, telemetryAGENT_KIND_VALUES, auto-pick order, display names, skills CLI keys (null), renderer catalog + favicon assets, mobile icon/favicon maps, docs, 8 localized READMEs, and the locale no-translate set. - Local status producer:
observeFreebuffTerminalStatusplusFreebuffScreenStatusTrackersplit PTY output at synchronized-frame boundaries (\x1b[?2026l), read visible screen lines, and emitworking/waiting/blocked/donepayloads throughemitTerminalAgentStatusEventson the local execution host only (!pty.connectionId, identity-checked). - Relay producer:
FreebuffStatusProjectionmirrors Freebuff PTYs on the relay and appends the existing OSC 9999 status frame while preserving raw byte credit (rawLength/seq,transformed: true). - Tests/fixtures: four captured transcripts, plus transcript, relay-projection (1/137/4096/full chunk sizes), launch/detection/CLI, remote-detection, and relay byte-accounting tests.
I traced the two riskiest seams. The local producer funnels through the same emitTerminalAgentStatusEvents → onTerminalAgentStatus → ingestTerminalStatus path as the OSC producer, so equivalence and normalization still apply; cleanData: '' is unused by that function, recordAgentPromptLifecycleState is still invoked, and restoreAgentPromptLifecycleByteOrder is a genuine no-op with a null offset. Every sessionBoundary-sensitive consumer (completion time, finished timestamps, unread count, automation completion, completion-hook observer) already excludes the launch done. On the relay, rawLength/seq match the existing transformed frame contract clients already charge, and replay bytes bypass the renderer's OSC processor on the pty:replay lane, so injected frames are inert.
ℹ️ Remote status only arms when Orca launched Freebuff
The relay creates FreebuffStatusProjection only when launchAgent === 'freebuff' (src/relay/pty-handler.ts:2018), while the local producer also identifies Freebuff from the startup command and the Freebuff: OSC title (src/main/runtime/freebuff-terminal-status.ts:15-18). A remote Freebuff a user starts manually in a shell, or a resumed session that drops launchAgent, therefore reports no status over SSH/WSL where the same pane would locally. Worth confirming that's intended.
ℹ️ Scraped working/waiting persists until a recognized idle screen
The tracker only leaves working/waiting when readFreebuffScreenStatus matches the captured idle layout (quota line plus End session), and the producer never clears lastExplicitAgentStatus on an unrecognized screen. Since paid/BYOK layouts were not exercised, footer-layout drift could leave the sidebar latched on working. The captured-transcript approach is the right guard; flagging only so the plan/BYOK gap is on record.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Incremental review of e13c1a5 (fix(agents): reset Freebuff status at a new session boundary) since the prior review at 7ada239. The session-boundary signal now originates in the screen reader and the tracker resets per-session state on it:
- Boundary in the reader:
readFreebuffScreenStatusreturns{ state: 'done', sessionBoundary: true }for the first-message ready screen instead of the tracker inferring it fromworked(src/shared/freebuff-screen-status.ts:84-86). - Tracker reset: on a
sessionBoundaryresult the tracker clearspromptandworkedbefore building the payload, so a fresh Freebuff session starts clean rather than inheriting the previous session's task text (src/shared/freebuff-screen-status.ts:132-141). - Test: the transcript test now replays
trust → ready → lifecycle → readyand assertssessionBoundary: truewithprompt: ''on each ready screen, andsessionBoundarynot true on the lifecycle's completed turn (src/main/runtime/freebuff-status-transcript.test.ts:87-124).
The reset ordering is right — worked is cleared before the !this.worked boundary check, so the ready screen keeps its boundary flag, and the signature dedup still suppresses repeated observations of the same screen while allowing the second session's boundary to re-emit. No new concerns; prior observations (relay arming only on launchAgent, scraped-state latch on untested layouts) still stand.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 8e112539-19c4-4f8f-b4f0-0a6711cb4821
📒 Files selected for processing (1)
src/main/daemon/serialize-grid-transcript-replay.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

ELI5
Select Freebuff in Orca and see what it is doing in the left sidebar: working, waiting for an answer, blocked on startup, or done. Previously it could launch, but those sidebar status rows were missing.
What Changed
Added Freebuff to the agent catalog, executable detection, CLI selection, desktop/mobile icons, telemetry, and supported-agent documentation. Prompts use the existing interactive terminal delivery path because Freebuff rejects positional prompts. Freebuff and Codebuff remain separate choices with independent settings.
Added an execution-host status producer that reads Freebuff's live composer and question panel from the existing terminal screen model and publishes through Orca's canonical agent status store. Questions include their text and choices. The SSH/WSL relay emits the existing status escape sequence, preserves raw terminal byte accounting, and cleans up its screen model with the terminal. Clients do not infer remote status from their screens.
Screen updates are observed at complete synchronized-frame boundaries, including fragmented escape sequences. Startup sign-in and repository trust prompts report blocked; declining trust clears that state when the first-message composer is ready. Settled, cancelled, and recovered tool-error turns report done.
Why
The terminal title contains task text, not activity state. Reading the live input area avoids mistaking old conversation text for current activity, and publishing through the existing store gives the sidebar and other subscribers the same state without adding renderer-specific guesses. Raw captured transcripts pin the detection rules to real screens.
Linked Issue
Refs #20376, #6871.
Visual Proof
Captured with the visual-proof skill and Playwright CDP in a background Electron instance, verified against this worktree. Real Freebuff 0.1.2, authenticated free usage, GLM 5.3 Flash, and folder workspaces. No status rows were injected. The corrected evidence includes the left sidebar.
Before: Freebuff asks a question, but the sidebar has no agent status row.
After: Working
After: Waiting for an answer
After: Done
After: Blocked on repository trust
State coverage
Additional launch evidence: Settings, picker, and unauthenticated login. Sign-in blocking also has a captured-transcript runtime test. Earlier manual continuation and exit to shell captures establish terminal behavior only; automatic session restoration is not added here.
Testing
The installed pnpm auto-switch target is broken on this machine, so typechecks/tests used the installed executables directly. No lockfile changes were needed.
Review
The four canonical sidebar states are implemented and visually verified. Detection is based on captured Freebuff 0.1.2 free-plan screens. Paid/BYOK layouts, provider/network failures, quota exhaustion, and long-running reconnection scenarios were not exercised. Done means the turn is settled; this change does not infer a separate success/failure/interruption verdict from conversation prose. Unknown overlays retain the last observed status.
CI follow-up: the transcript round-trip suite discovers every new capture automatically. The lifecycle and login captures exposed 12 and 10 existing resize-replay differences, respectively. Comparing against the pre-PR serializer at
6835b9b4e3eaproved no byte or behavior regression. Each exact checkpoint and full diff signature is recorded in a baseline generated from the pre-PR serializer; matching totals alone cannot pass; all 32 transcript cases pass, and the differential Freebuff cases pass. CodeRabbit’s new-session boundary and exact-baseline findings are fixed and regression-tested; Pullfrog reported no new issues.Community cross-reference and credit
Reviewed all Freebuff implementation PRs found across open and closed community contributions:
The comparison preserves the launch coverage and adds the execution-host status producer and rendered sidebar proof missing from those launch-only implementations. Locale entries follow this branch's current extraction and brand policy. Other search matches (#22119, #22099, #20397, #22127) concern mobile bundle integration or other agents, rather than an additional Freebuff implementation.
All three contributors above will be credited with
Co-authored-bytrailers in the squash commit.Agent skill upstream boundary
Checklist