Release v0.0.193 — REPL UX, Codex WebSocket transport, markdown tables - #141
Merged
Conversation
TUI (first, per harness-first rule): renderMarkdown in repl.zig now detects | pipe tables and draws them with box-drawing characters, wrapping cell text to fit the terminal width (width_hint cached from the last rendered frame; 0 assumes 100 cols). GUI: table rendering extracted from MarkdownRenderer into a dedicated ChatTable component (alignment, header styling unchanged) with tests. Co-Authored-By: blackfloofie <265516171+blackfloofie@users.noreply.github.com>
…WebSocket/SSE/fallback, context limits, pickers, spinner, narrow-terminal, model preference, fallback PTY tests
Commit 413536a added the imports and usages of `command_catalog` across main.zig, commands_misc.zig, and pickers.zig but never staged the file itself, so `zig build` failed everywhere with `unable to load 'command_catalog.zig': FileNotFound` — the zig + windows CI jobs on PR #141 (and any local build) were red. Reconstruct the module from its three consumers and the pre-refactor /help text: - Item { name, desc = "", usage = "" } — matches every PickItem literal (file/reasoning/login/ultracode pickers) and the /help renderer, which reads .usage. - commands[]: the canonical menu/help list; `name` is the runnable "/foo" (the bare "/" menu passes it straight to handleCommand), `usage` the fuller form shown only in /help, `desc` the one-liner. - names: derived from commands so tab completion never drifts from the menu. Re-exported as main.repl_commands. - catalog-integrity unit test (restores the suite to 150/150). Validation: zig build; zig build test (150/150); test-pty-repl.py, test-json-controls.py (19/19), test-pty-markdown.py, test-model-preference.py, test-pty-spinner.py all pass; diff --check clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Brings the pipe-table renderer into release/v0.0.193. GUI files (ChatTable.tsx/.test.tsx, MarkdownRenderer.tsx) merged clean; only src/repl.zig conflicted because v0.0.193 had extracted repl.zig into sibling modules (repl_model_turn/render, repl_run, repl_util) after this branch was cut. Conflict resolution + adaptations: - src/repl.zig: kept v0.0.193's extraction aliases (startJob/finishJob/ drainSteer/setGoal, spinnerFrame/statusLine/render, run/runScripted/ main) and layered in the PR's new table helpers (isTableRow/isTableSep/ plainInline/dispWidth/wrapCell/tableRule/renderRecords/renderTable); dropped the PR's stale pre-refactor copies of renderInline/run/ runScripted/main/etc. that now live in the sibling files. - renderMarkdown kept `pub` + gained the `width_hint` arg; repl_model_turn finishJob now passes self.last_term_width; repl_model_render render() caches self.last_term_width = term_width each frame (else the width feature silently no-ops). Test's bare stripControl -> util.stripControl. - Quick-fix: the TUI cell splitter now honors escaped `\|` as a literal pipe (parity with the GUI parser), covered by a new unit test. Known follow-ups (non-blocking, tracked separately): TUI dispWidth counts codepoints not display width (CJK/emoji border misalignment); TUI ignores column alignment (:--:) that the GUI honors. Validation: zig build; zig build test 150/150; zig build repl-test 15/15 (incl. 4 PR table tests + the new escape test); test-pty-repl/json-controls/ markdown all pass. GUI bun tests not run (node_modules not installed; files merged clean and were reviewed). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
justrach
marked this pull request as ready for review
July 10, 2026 14:57
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.
Release v0.0.193 — REPL UX hardening, the Codex WebSocket transport, and markdown tables.
Highlights
command_catalog.zigpowering/help, the bare/menu, and tab completion so they never drift./key <provider> <secret>is masked and kept out of live + persisted history./models healthreports active/saved model, context/compaction limits, credential source (never value), Codex catalog source/count, WebSocket→SSE status, and fallback policy. Prompt context line is unambiguous (used/full ctx (% · compact@limit)).wss://…/codex/responseswith automatic SSE fallback on any handshake failure (GRAFF_CODEX_WS=offforces SSE). Verified live end-to-end on gpt-5.5 and gpt-5.6 (sol/terra/luna) —101 Switching Protocols, streamed events, clean reply.graff models [refresh]; cross-provider fallback is opt-in per workspace via/fallback; unknown remote model names are rejected before switching or changing the saved default.\|escape handling.Fixes in this PR
fix(repl): restore missingcommand_catalog.zig— the handoff commit added the import + usages but never staged the file, breakingzig buildon every platform (zig + windows CI were red). Reconstructed with a catalog-integrity test.Validation
zig build·zig build test150/150 ·zig build repl-test15/15 (incl. table + escaped-pipe tests) ·test-pty-repl/test-json-controls/test-pty-markdown/test-model-preference/test-pty-spinnerall pass. CI green on zig + windows + sdk.Follow-ups (non-blocking)
dispWidthcounts codepoints, not display width (CJK/emoji border misalignment).:--:) that the GUI honors.🤖 Generated with Claude Code