Repository navigation
feat(tui): live-refreshing kanban and dashboard - #8
Merged
Merged
Conversation
added 2 commits
August 2, 2026 21:11
The kanban and dashboard now poll for external changes on a 1s timer gated by a cheap mtime probe, so an agent (or an editor in another window) editing tasks.md is reflected in the TUI within ~1s with no keypress. - client: OpenSpecClient.has_changed() (stat-only mtime snapshot of the changes/specs dirs + each tasks.md/spec.md) gates the expensive openspec list shell-out; reset_change_cache() re-baselines after a forced refresh; root() is now cached so the probe never shells out - app: ephemeral live_refresh flag + _in_editor foreground-busy flag + toggle_live_refresh() + live_label glyph (● live / ○ paused); not persisted (thin-client invariant preserved) - kanban/dashboard: set_interval(1.0, _tick) on mount; _tick skips when paused, not the top screen, or foreground-busy; title shows the glyph; 'p' toggles live, 'r' forces reload (always works) - detail: _in_editor flag wrapped in try/finally around app.suspend() so polling never races a half-saved file during Verified via Textual run_test(): external edit -> reload; p toggles live/paused + glyph; r forces reload; modal open -> tick skips; editor flag suppresses polling. openspec validate add-live-kanban passes. Implements tasks 1.1-6.6 of the add-live-kanban change.
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.
Implements OpenSpec change add-live-kanban.
What
The kanban and dashboard now reflect external changes (an agent editing
tasks.mdin another window, or any editor) within ~1s, with no keypress. The TUI stays a pure viewer — it observes work happening elsewhere, it doesn't orchestrate it.How
OpenSpecClient.has_changed()): a 1sset_intervaltick stats the changes/specs dirs + eachtasks.md/spec.md. Only when an mtime actually moved does it shell out toopenspec list. Idle ticks cost a handful ofstatcalls — no subprocess.ptoggles; the title shows● live/○ paused.$EDITORsession (_in_editorflag intry/finallyaroundapp.suspend()). Manualralways forces a reload and re-baselines the cache.Verification
All interactive paths exercised via Textual's
run_test()harness (intasks.md):tasks.mdedit →_tickreloads (kanban + dashboard)pflips live/paused + glyph; ticks stop when pausedrforced reload works in both statesself is not self.app.screenguard)foreground_busy()True during editor, False afteropenspec validate add-live-kanbanpasses. Task 6.7 is this PR.Non-goals (deliberate, per design)
r; racing the in-app editor isn't worth it yet).OpenSpec change:
add-live-kanban