Repository navigation
Description
Context & Rationale
devops dashboard and its alias devops tui (src/devops_cli/main.py:66-67) are already the reactive Textual app this item asked for. PR #361 (from #317) runs each domain refresh on its own worker thread (@work(thread=True), src/devops_cli/ui/dashboard.py:225-230). Those workers publish into a thread-safe store (src/devops_cli/ui/state.py:59-157). The same PR added a bounded, virtualized pod-log tail (src/devops_cli/ui/log_buffer.py; src/devops_cli/ui/widgets.py:264-451).
The app has five domain tabs (Kubernetes, Docker, Telemetry, AI Review and Valkey Cache; src/devops_cli/config/constants.py:1942-1961) plus a Logs tab, all switched by key (dashboard.py:139-154). Two master-to-detail paths exist already:
- Selecting a pod opens its followed log (dashboard.py:263-277).
- Selecting a review session loads its findings (dashboard.py:232-239).
What is wrong, measured against the code:
-
The dashboard loses the operator's place every 5 seconds.
- Every
DEFAULT_DASHBOARD_REFRESH_SECONDS = 5(src/devops_cli/config/defaults.py:773; scheduled at dashboard.py:193-195), each table is redrawn withtable.clear()followed byadd_rows(widgets.py:102, 184, 253, 258). - In the pinned Textual 8.2.8 (pyproject.toml:40),
DataTable.clear()resets the cursor to (0,0) and the scroll offset to 0 (textual/widgets/_data_table.py:1582-1608). - So a cursor moved to a pod, container or finding jumps back to the first row within 5 seconds. This happens on visible and hidden tabs alike.
- Switching tabs loses nothing.
TabbedContentonly hides the inactive pane (display = False, textual/widgets/_content_switcher.py:97), so its widgets stay mounted. The refresh is the cause. - No test checks cursor or scroll position across a refresh. The only cursor calls in tests/test_ui_*.py are
move_cursor(row=0)(tests/test_ui_reactive.py:1375, 1409, 1543). - A detail pane that follows the cursor would be reset along with it, so this is fixed first.
- Every
-
A finding cannot be read in the dashboard.
-
The AI Review table has four columns: severity, title cut to 45 characters, location and status (src/devops_cli/ui/projections.py:44, 214-224).
-
Each finding record also carries:
- description and fix
- observed and expected values
- category, confidence and references
- the text explaining its verdict:
invalidation_reason,mitigating_mechanismandverification_note
(src/devops_cli/ai/review_schema.py:547-633)
-
The newest local review session (20260930-232803) has 190 findings. Of those:
- 120 titles are longer than 45 characters
- the median description is 327 characters
- 108 fixes span several lines
- 66 findings carry a
mitigating_mechanism, including both MITIGATED ones
None of this text is shown.
-
The CLI shows part of it.
devops review findings --detailsprints the description, fix, invalidation reason and references in a panel for each finding (src/devops_cli/commands/review.py:785-808, 914-930). The dashboard has nothing equivalent. -
The provider also keeps only the first 50 findings (src/devops_cli/ui/data_providers.py:548), while the banner reports the full total (data_providers.py:544; projections.py:151-155). In that session, 140 of 190 findings cannot be reached. The cap dates from the first dashboard (b861fc4, v0.2.13), and no reason for it was recorded.
-
-
Only the findings table hides record text. Every other table's record fits in its columns: pods, containers, images, networks, volumes, registries, telemetry and review sessions (data_providers.py:165-297; projections.py:195-257, 321-339).
- The one exception is Valkey
uptime_seconds. It is fetched (data_providers.py:595) but shown in neithervalkey_rows(projections.py:247-257) nor the banner. - Showing it needs a table row, not an inspector, so it is not part of this item.
- The one exception is Valkey
What is vision, not need:
- Seven renamed workspaces. Each is already its own item (feat(github): github tab in devops dashboard with an oldest-first pr queue, pr inspector, failing-log view and api quota (
tab-github) #685-feat(telemetry): centralized loki logql streamer, prometheus sparklines & trace waterfalls (tab-telemetry) #691). - URL-like hash routing. A terminal app has no URL, and
--tabalready opens a tab by number or name (src/devops_cli/commands/dashboard.py:32-37, 186-188). - Push events. Polling already skips a refresh while the previous one is still running (state.py:72-84). Whether to watch pods (src/devops_cli/k8s/informer.py:50) is feat(k8s): truthful pod status, filters, container-aware logs and pod inspector in the dashboard (
tab-k8s) #686's call. - Filter queries kept across tab switches. No filter exists yet: src/devops_cli/ui has no
Inputwidget.- A future filter survives tab switches for free, because hidden panes stay mounted.
- Keeping it through a refresh follows from this item's row keys.
- feat(k8s): truthful pod status, filters, container-aware logs and pod inspector in the dashboard (
tab-k8s) #686's/search will be the first filter.
- YAML, log and Markdown inspectors on every tab. Pod logs already open from the Kubernetes tab. Pod YAML and events are feat(k8s): truthful pod status, filters, container-aware logs and pod inspector in the dashboard (
tab-k8s) #686, and PR detail is feat(github): github tab in devops dashboard with an oldest-first pr queue, pr inspector, failing-log view and api quota (tab-github) #685.
Nothing here touches a removed component.
Scope & Deliverables
- Deliverable: Refreshes keep the operator's place.
- Every row of every dashboard table gets a stable string key.
- The keys come from new pure functions in src/devops_cli/ui/projections.py, one per table, registered beside
_ROWSandDOCKER_RESOURCE_ROWS. Each function returns one identity tuple per row, in row order, built from the record:- pod: namespace, name
- container, image, network: id
- volume, registry: name
- telemetry: type, name
- Valkey: property name
- review session: name
- finding: persona, location, full title.
finding_idisNoneon all 190 findings of the measured session, and the row holds neither the persona nor the full title.
- The existing projection functions keep their signatures:
render_domain,render_rows,ai_rows,docker_resource_rowsandreview_session_rows. - One shared helper turns identities into keys:
- It appends an occurrence number to each identity: 0 for the first, 1 for the first repeat, and so on.
- It encodes the result with
json.dumps, because Textual'sadd_rowtakeskey: str | None(_data_table.py:1669-1675) and mypy runs in strict mode (pyproject.toml:96-99). - Because this happens in one place, a repeated identity cannot raise
DuplicateKey(_data_table.py:1693) in any table. Two containers with the empty-idfallback (data_providers.py:200) are one example. Without this, the error would blank the whole panel throughapply_snapshot's error path (dashboard.py:253-261).
- One redraw helper replaces the four bare
clear()/add_rowssites (widgets.py:102, 184, 253, 258). It:- saves the highlighted row key, the cursor index and
scroll_y; - redraws the rows with
add_row(..., key=...); - puts the cursor back on the same key. If that key is gone, the cursor keeps its index, moved back to the last row if the table is now shorter;
- restores
scroll_y.
- saves the highlighted row key, the cursor index and
- Restore order:
move_cursor(row=i, scroll=False), thencall_after_refresh(table.scroll_to, y=saved, animate=False)(proposed).scroll=Falsealone is not enough. Whenever the cursor moves, the cursor watcher schedules its own_scroll_cursor_into_viewfor after the next refresh (_data_table.py:1193-1212), which would undo an earlier restore. - Sometimes the findings table shows a different review session from the last render: a session was picked in the Sessions table, or a newer review completed while none was picked. In that case the findings cursor and scroll return to the top instead.
- Deliverable: A finding detail pane on the AI Review "Findings" sub-tab.
- Layout. The findings table is on the left (3fr) and a scrollable detail pane on the right (2fr). The pane is a
Static(markup=False)inside aVerticalScroll. - Source. The pane's text comes from a pure function,
finding_detail(record: dict[str, Any]) -> str, in projections.py. It reads the raw finding dict the snapshot already holds (data_providers.py:528), so nothing is refetched. - Text layout. A header of
label: valuelines, then a titled section for each long text field, in this order:- Header:
- title (full)
- severity
- status
- persona:
persona_title, falling back topersona, asreview findings --detailsdoes (commands/review.py:787) - category
- confidence, to 2 decimals, as at review.py:885
- location
- citation line
- verified by
- Sections:
- description
- observed value
- expected value
- fix
- references, one per line
- verification note
- invalidation reason
- mitigating mechanism
- Header:
- Cleaning. Description and fix pass through
format_clean_text_field(src/devops_cli/ai/review_schema.py:114), the cleaner the CLI panel already uses (review.py:797, 800). - Empty fields. A field is omitted only when it is
None, a blank string or an empty list.0and0.0are shown. - Fields left out on purpose:
recommendation: the persona's merge verdict fromderive_recommendation(review_schema.py:1102-1105, 1146-1160). It is "REQUEST CHANGES" on all 190 findings, so it is not advice about the finding.fixis.thinking: this is feat(ai): ai constellation topology, rag health & review findings studio (tab-ai) #690's rationale scratchpads.- Bookkeeping fields:
verification_criteria,invalidation_criteria,criteria_execution_results,verified_criteria_matched,invalidated_criteria_matched,perimeter_files,regression_test,relocated_from,verified_at,reportable,verified,mitigatedandfinding_id.
- Control characters. Control characters (Unicode category
Cc) other than newline and tab are written as visible escapes such as\x1b. Textual strips only bell, backspace, vertical tab, form feed and carriage return (textual/content.py:56-62), so a raw ESC in model-written text would otherwise reach the terminal. - The field list and labels are declared in src/devops_cli/config/constants.py.
- Following the cursor.
- The pane follows
DataTable.RowHighlightedfrom#ai-tableonly. Highlights in the sessions table are ignored. - It looks the record up by the event's row key in the current snapshot. That way a highlight queued before a refresh cannot show the wrong finding.
- With no findings, the pane reads
No finding selected.
- The pane follows
- The
ikey.ishows and hides the pane.- It is bound on
ReviewPanelwithshow=False, because the footer already truncates (dashboard.py:136-138). It therefore acts only while focus is inside AI Review. - The help screen (dashboard.py:104-120) gains the line
i : toggle finding detail (AI Review).
- Layout. The findings table is on the left (3fr) and a scrollable detail pane on the right (2fr). The pane is a
- Deliverable: Every finding in a session is listed. The 50-finding cap at data_providers.py:548 is removed. The largest local session has 382 findings.
- Deliverable: The delivering commit rewrites the task file docs/agent/tasks/task-684-reactive-multi-workspace-textual-tui-architecture-master-det.md and the roadmap entry (docs/ROADMAP.md:601-604) to this item's scope. Both still describe the seven workspaces and hash routing.
- Deliverable: Pilot and unit tests in tests/test_ui_reactive.py for each acceptance criterion.
- Acceptance criteria:
- The tests pass 3-row overrides to the existing fixture:
patched_fetchers(k8s=..., docker=..., ai=...)(tests/test_ui_reactive.py:929-932). The default samples hold one row each (78-157). With the cursor on row 2 of the Kubernetes, Docker containers and findings tables,action_refresh_data()with unchanged data leaves(cursor_row, highlighted row key)unchanged. These tests fail on the current code. - A Kubernetes table with 50 pods, in
run_test(size=(100, 24)), keeps its place acrossaction_refresh_data():- cursor on row 12 and
scroll_y=10: afterwards(cursor_row, scroll_y) == (12, 10) - cursor on row 2 and
scroll_y=20, so the cursor is scrolled out of view: afterwards(cursor_row, scroll_y) == (2, 20)
- cursor on row 12 and
- If the highlighted record is missing from the next snapshot, the cursor keeps its index, moved back to the last row if the table is now shorter, and nothing raises.
- Two findings with the same persona, location and title render as two rows, and a cursor on the second stays there across a refresh. Two containers with an empty
idalso render as two rows, with no error banner. - Moving the cursor to row 20 and then applying a findings snapshot with a different
session_namegives(ai-table.cursor_row, ai-table.scroll_y) == (0, 0). - For every domain and every Docker resource, the identity function returns as many entries as the row projection does for the sample snapshots.
- Highlighting a finding shows its full title, description, fix and mitigating mechanism in the pane, and no
thinkingorrecommendationtext. - Moving the cursor updates the pane. A refresh with unchanged data leaves the pane's text unchanged. With an empty findings table, the pane reads
No finding selected. finding_detailkeepsconfidence_score=0.0andcitation_line=0, and omits fields that areNone,""or[].- A finding whose description is
a \x1b[31mred\x1b[0m [bold]x[/]renders withoutMarkupError. The pane's text contains[bold]x[/]and the four characters\x1bverbatim, and no ESC (U+001B) character. - With the findings table focused, pressing
ihides the pane and pressing it again shows it. Pressingion the Kubernetes tab changes nothing. The help text listsi. - A session written with
_make_sessions(tmp_path, {"20260930-000000": 60})(tests/test_ui_reactive.py:1713-1724), withDEVOPS_CLI_DATA_DIRset, gives(len(summary.findings), summary.total_findings) == (60, 60)fromfetch_review_status(). The current code gives(50, 60). - Every existing test in tests/test_ui_reactive.py and tests/test_ui_dashboard.py passes unmodified. This covers the widget ids (
#k8s-table,#docker-table,#ai-table,#review-sessions-table), pod-to-logs selection and session selection. uv run devops cipasses.
- The tests pass 3-row overrides to the existing fixture:
- Key questions:
-
Which of the seven requested workspaces does this item build? None (proposed). Five domain tabs and Logs exist, and the others are their own items:
- PR & Git: feat(github): github tab in devops dashboard with an oldest-first pr queue, pr inspector, failing-log view and api quota (
tab-github) #685 (v0.2.24) - K8s: feat(k8s): truthful pod status, filters, container-aware logs and pod inspector in the dashboard (
tab-k8s) #686 (v0.2.24) - Docker & Sandboxes: feat(cli): docker containers & multi-tier workload sandbox console (
tab-docker) #687 (no milestone) - SecOps & Vault: feat(security): unified secops, compliance & hashicorp vault command center (
tab-secops) #688 (no milestone) - GitOps & ArgoCD: feat(github): gitops fleet, argocd rollouts & cloud cost monitor (
tab-gitops) #689 (no milestone) - AI: feat(ai): ai constellation topology, rag health & review findings studio (
tab-ai) #690 (v0.2.26) - Telemetry & Loki: feat(telemetry): centralized loki logql streamer, prometheus sparklines & trace waterfalls (
tab-telemetry) #691 (v0.2.26)
No tab is renamed, and Valkey Cache stays.
- PR & Git: feat(github): github tab in devops dashboard with an oldest-first pr queue, pr inspector, failing-log view and api quota (
-
Do tab switches need state work? No. Textual keeps hidden panes mounted (_content_switcher.py:97). Only the refresh resets the cursor and scroll.
-
What is each table's row key, and how is it encoded? The identity tuples listed in the first deliverable, plus an occurrence number, encoded as a string with
json.dumps(proposed). -
What happens when the highlighted record disappears? The cursor keeps its index, moved back to the last row if needed (proposed).
-
What happens when the review session changes? The findings cursor and scroll go back to the top. Carrying row 37 of one session over to an unrelated session would mislead (proposed).
-
Which tables get a detail pane, and is it a shared widget? Only findings, and it is not a shared, domain-keyed widget (proposed).
- feat(github): github tab in devops dashboard with an oldest-first pr queue, pr inspector, failing-log view and api quota (
tab-github) #685's PR inspector needs a commit diff summary and failing check logs. - feat(k8s): truthful pod status, filters, container-aware logs and pod inspector in the dashboard (
tab-k8s) #686's pod inspector needs manifest YAML and pod events. - Both are fetched on demand and are not held in any snapshot, so a shared design built now would be the wrong shape. Each of those items decides how its inspector fetches data, and a common widget is extracted then if one fits.
- feat(github): github tab in devops dashboard with an oldest-first pr queue, pr inspector, failing-log view and api quota (
-
Should the pane render YAML, Markdown or plain text? Plain labelled text, with markup off (proposed).
yaml.safe_dumprenders a multi-line string in single quotes with every line break doubled (checked on a real fix), and 108 of 190 fixes are multi-line.- YAML stays the right format for feat(k8s): truthful pod status, filters, container-aware logs and pod inspector in the dashboard (
tab-k8s) #686's manifests. - Markdown rendering of model-written text is out of scope.
-
Which fields does the pane show? The ordered list in the second deliverable (proposed).
persona_titleis shown in place ofpersona, falling back topersonawhen it is empty.- The persona's merge verdict (
recommendation) is not shown anywhere in this item.
-
What layout and keys? Side by side, 3fr table to 2fr pane, with no width breakpoints.
itoggles the pane; it is bound onReviewPanelwithshow=Falseand listed in help.iis unbound today (dashboard.py:139-154; widgets.py:272-278) (proposed). -
Filter queries? Not in this item, and there is no split-off for them (proposed). feat(k8s): truthful pod status, filters, container-aware logs and pod inspector in the dashboard (
tab-k8s) #686's/search is the first filter. Its refinement should state that the filter must keep applying across refreshes, using this item's row keys. -
Hash routing? Dropped.
--tabcovers choosing a tab at launch (proposed). -
Push events? Polling stays (proposed).
DashboardState.subscribe(state.py:147) has no caller in src and is left alone. feat(k8s): truthful pod status, filters, container-aware logs and pod inspector in the dashboard (tab-k8s) #686 decides whether to watch pods. -
Lift the 50-finding cap, or only report it? Lift it (proposed). No test depends on the cap, and the largest local session (382 findings) is a small redraw.
-
Priority? P1, not P0 (proposed).
- Value is Medium. The cursor reset and the hidden findings cost the operator time, not data or safety.
- No other item depends on this one.
- The label changes from
priority/p0-criticaltopriority/p1-high, and the roadmap entry changes with it. - The item stays in v0.2.24, where it already was.
-
- Constraint: Finding text is model output that quotes repository content, so the pane renders it with Rich markup off and with control characters escaped. In the measured session, 47 of 190 findings contain
[in their description or fix. - Constraint: The control-character rule uses the complete Unicode
Cccategory, not a hand-picked list. The field list and labels live in constants.py (AGENTS.md:21-24). - Constraint: No new dependency. Textual 8.2.8 is already pinned (pyproject.toml:40).
- Constraint: Tests use only patched fetchers, direct
apply()calls or a temporaryDEVOPS_CLI_DATA_DIRbuilt with_make_sessions. They need no cluster, Docker daemon, Valkey or network. - Constraint: Cyclomatic complexity of 10 or less, nesting depth of 5 or less, and tuple-equality assertions in tests (AGENTS.md:14-17).
- Constraint: Out of scope:
- new or renamed workspaces (feat(github): github tab in devops dashboard with an oldest-first pr queue, pr inspector, failing-log view and api quota (
tab-github) #685-feat(telemetry): centralized loki logql streamer, prometheus sparklines & trace waterfalls (tab-telemetry) #691) - pod YAML, events,
/search and namespace filters (feat(k8s): truthful pod status, filters, container-aware logs and pod inspector in the dashboard (tab-k8s) #686) - a findings tree, display of
thinkingor rationale, diff previews and one-key verdict changes (feat(ai): ai constellation topology, rag health & review findings studio (tab-ai) #690) - the command launcher (feat(cli): universal terminal command palette & fuzzy action launcher #694)
- MCP dashboard tools (feat(mcp): fastmcp tui management tools & dynamic dashboard resources #695)
- a Valkey uptime row
- showing the persona's merge verdict
- new or renamed workspaces (feat(github): github tab in devops dashboard with an oldest-first pr queue, pr inspector, failing-log view and api quota (
Strategic Alignment
- Milestone: v0.2.24
- Depends on: Nothing.
- Builds on this item:
- feat(k8s): truthful pod status, filters, container-aware logs and pod inspector in the dashboard (
tab-k8s) #686's/search keeps its filter through refreshes by using these row keys. - feat(ai): ai constellation topology, rag health & review findings studio (
tab-ai) #690's Review Findings Studio (v0.2.26) builds on this item's findings pane and row keys rather than replacing them.
- feat(k8s): truthful pod status, filters, container-aware logs and pod inspector in the dashboard (
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
[-]feat(cli): reactive multi-workspace textual tui architecture & master-detail navigation (`devops dashboard`, `devops tui`)[/-][+]feat(cli): dashboard keeps its place across refreshes and shows a finding detail pane (`devops dashboard`, `devops tui`)[/+]dan-petty commentedon Oct 1, 2026
Relabelled from priority/p0-critical to priority/p1-high, as this item's refinement proposes: it is a feature, not a critical fix. It stays in v0.2.24, which it was already in when the release started.
feat(cli): dashboard keeps its place across refreshes and details the…
dan-petty commentedon Oct 1, 2026
Closed by #830, merged into
release/v0.2.24.GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by
devops gh issues close-merged.feat(k8s): truthful pod status, filters, container-aware logs and pod…
feat(release): v0.2.24 (#905)