Skip to content

fix(cli): declare the transcript viewer's mid-turn disposition - #3485

Closed
Astro-Han wants to merge 1 commit into
mainfrom
fix/cli-transcript-mid-turn
Closed

fix(cli): declare the transcript viewer's mid-turn disposition#3485
Astro-Han wants to merge 1 commit into
mainfrom
fix/cli-transcript-mid-turn

Conversation

@Astro-Han

Copy link
Copy Markdown
Contributor

Summary

main does not typecheck. MakaSlashCommand.midTurn became required so every handler has to state whether it is safe to run while a turn is in flight; /transcript (#2999) landed in parallel and never got an answer:

packages/cli/src/pi-tui-runner.ts(2877,5): error TS2741: Property 'midTurn' is missing in type
'{ description: string; run: (parts: string[]) => void; }' but required in type
'Omit<MakaSlashCommand, "aliases" | "name">'.

Neither PR was wrong on its own — the conflict is semantic, so both merged green and main broke. The viewer is a full-screen overlay over the same TUI the running turn paints into, which is the picker case 'refuse' exists for, so that is its declared answer.

Refs #2999

Verification

  • npm run build — passes with this change, fails on main without it
  • npm run format:check — clean
  • npm test --workspace maka-agent — 371 pass, 0 fail

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Claude Code diagnosed the cross-PR type break and wrote the one-line declaration and its comment. The human contributor reviewed the diff and the disposition choice.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

The compiler is the test: main fails to build without this change.

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

/transcript is now refused mid-turn instead of opening over a running turn.

`MakaSlashCommand.midTurn` became required so every handler states whether
it is safe to run while a turn is in flight. `/transcript` landed in
parallel and never got an answer, so `main` no longer typechecks:

    pi-tui-runner.ts: error TS2741: Property 'midTurn' is missing in type
    '{ description: string; run: (parts: string[]) => void; }'

The viewer is a full-screen overlay over the same TUI the running turn
paints into — the picker case `'refuse'` exists for — so that is its
answer.

Generated-by: Claude Code
@Astro-Han
Astro-Han marked this pull request as ready for review August 22, 2026 11:41
@Astro-Han

Copy link
Copy Markdown
Contributor Author

Superseded by #3459, which landed the same declaration on main in b434a49. main builds again, so this is redundant — closing.

One correction worth recording for anyone who hits this next: the value that landed is midTurn: 'local', not 'refuse'. The type's own doc comment draws the line at whether the handler enters runControl'local' requires the handler to be independent of the running turn, 'refuse' is for anything that mutates session state or opens a picker the turn would race. showTranscriptViewer only calls tui.showOverlay and never touches runControl, so 'refuse' would have compiled while silently disabling /transcript exactly when reading back is most useful.

Review assisted by AI (Claude Opus 5).

@Astro-Han Astro-Han closed this Aug 22, 2026
@Astro-Han
Astro-Han deleted the fix/cli-transcript-mid-turn branch August 22, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant