chore(deps): bump tuika to 0.9 and migrate the dashboard runner - #80
Merged
Merged
Conversation
tuika 0.9 collapses the runner's ten `run*` methods into one `FrameSource` seam and replaces the async update closure's `ControlFlow<()>` with `UpdateResult`, so the dashboard host loop moves to `run(theme, async_from_fn(state, view, update))` and returns `Dirty`/`Exit`/`Clean` instead of `Continue`/`Break`. `Flex` and `RatatuiView` moved to `components` and `interop` respectively, and `RunnerConfig` gained a `screen_mode` field. The signal handling is split out of the runner closure into `update`, so the tick/refresh/quit contract is covered by tests that need no terminal: ticks poll and repaint, a dead server records the disconnected state, `r` refreshes out of the tick cadence, `q`/`Esc` exit, and unmatched or modified keys stay `Clean` for the runner's own default handling. Rendering is unchanged; ratatui still unifies on 0.30.2.
`openai` 3.x depends on `httpx2` rather than `httpx`, so the raw Responses API call in this example lost its transitive `httpx` and died with `ModuleNotFoundError`. The examples resolve from PyPI at run time, so the break arrived with the upstream release rather than with any repo change. Declare `httpx` explicitly in the script's inline metadata.
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.
What changed
serve --tuinow runs on tuika 0.9 (from 0.4). The dashboard looks and behavesexactly as before — same panels, same colors, same
q/rbindings — so this isa no-op for users of the binary. What changed is underneath:
FrameSourceseam(
run(theme, async_from_fn(state, view, update))), replacing the four-argumentrun(theme, state, view, update)that 0.9 removed.UpdateResult(Dirty/Exit/Clean)instead of
ControlFlow<()>. Ticks and manual refreshes returnDirtyso theframe still repaints on every poll; unmatched and modified keys return
Clean,which lets the runner apply its own default input handling.
updatefunction.That is what makes the tick/refresh/quit contract testable without a terminal —
previously none of it was covered.
Flex→tuika::components,RatatuiView→tuika::interop;RunnerConfiggained ascreen_modefield (left at itsAlternatedefault).ratatui still unifies on 0.30.2 across the
RatatuiViewinterop boundary, so thewidget code is untouched.
Why
tuika 0.4 is five releases behind. 0.9 is a breaking release that collapses the
runner's ten
run*methods into one seam and changes the update-result type, sothe bump could not be a version-only change — taking it now keeps the dashboard
on a supported API instead of accumulating more drift.
Before / After
The rendered dashboard is unchanged. Captured live against a running server
(
serve --tui) on this branch, after driving traffic through the OpenAI andAnthropic endpoints:
Live-refresh (
r) and quit (q) were both exercised interactively: the panelsupdate out of the tick cadence on
r, andqtears the alternate screen downand exits cleanly.
Before the bump, the crate did not build against tuika 0.9 at all — 6 compile
errors across the two TUI modules (unresolved
Flex/RatatuiView, the missingRunnerConfig::screen_modefield, and the changedrunsignature).Risk
tuifeature; the server, APIs, and librarypaths are untouched. A behavior regression would be confined to the dashboard's
repaint cadence or key handling, both of which are now covered by tests and were
verified interactively.
Checklist
(tick polls and repaints, dead server records the disconnected state,
rrefreshes out of cadence,
q/Escexit, unmatched and modified keys stayClean), against a stub stats endpoint so no terminal is needed. Fullsuite: 289 passing.
dashboard rendering is byte-identical.
Generated by Claude Code