Skip to content

feat(dashboard): add cloud-native monitoring guide and restructure Dream run detail - #2557

Open
happy-v587 wants to merge 28 commits into
oceanbase:masterfrom
happy-v587:codex/dashboard-home-summary
Open

happy-v587 wants to merge 28 commits into
oceanbase:masterfrom
happy-v587:codex/dashboard-home-summary

Conversation

@happy-v587

Copy link
Copy Markdown
Contributor

Which issue or RFC does this PR close?

Closes #.

Rationale for this change

The Dashboard previously exposed Dream runs as a card grid without a readable task narrative, and offered no entry point for operators who need to wire up the cloud-native monitoring stack. This PR makes Dream task detail follow the actual execution order (Input → Processing → Output) and adds a static cloud-native monitoring guide so telemetry setup is documented where operators already work.

What changes are included in this PR?

  • Dream run detail restructure: the Dream run detail view is extracted into its own component (dream-run-detail.html) and now follows Input, Processing, and Output in reading order. Input shows up to 20 authorized exact Artifact previews with identity and source references collapsed by default; the processing stage retains the recorded status, reason, error, timestamps and attempt count; output links to the recorded candidate or states explicitly that no new output was recorded. Unfinished tasks keep polling, and unselected sibling inputs no longer leak into the detail view.
  • Cloud-native monitoring guide: a new static page under observation navigation (observability) covers managed Docker Compose deployment, Server telemetry settings, Grafana/Phoenix access, read-only verification and external platform connections, with bilingual (en/zh) content. The page keeps Dashboard authentication, requires no Scope or running monitoring stack, and performs no deployment actions.
  • Type-scale consistency: processing detail sections now inherit one consistent font size so nested sections no longer mix competing scales.
  • Bilingual documentation and labels: docs/en/development/dashboard.md, docs/zh/development/dashboard.md, and both label files gain the new sections and strings.

Are there any user-facing changes?

  • The left navigation gains a "Cloud-native monitoring / 云原生监控" entry under Observation.
  • Dream run detail pages present a new three-stage layout; there is no change to the underlying API or persisted formats.

How was this change tested?

  • uv run pytest tests/test_dashboard_processing.py tests/test_dashboard_observation.py tests/test_dashboard_observability_guide.py -q — 47 passed.
  • New regression assertions verify the Input → Processing → Output ordering, bounded input previews (unselected siblings excluded), collapsed references, candidate/no-output output stage, polling retention, and the new navigation entry.

AI usage statement

Implemented and validated with OpenCode (GLM model); code and tests were authored with AI assistance and reviewed by the human author.

@happy-v587

Copy link
Copy Markdown
Contributor Author

UI 改动效果说明:#2371 (comment)

@AlexStocks AlexStocks added the 1.6.0 v1.6.0 release tracking label Nov 9, 2026
@happy-v587
happy-v587 force-pushed the codex/dashboard-home-summary branch 6 times, most recently from 8763cdd to 0c96d99 Compare November 9, 2026 18:34
@happy-v587
happy-v587 force-pushed the codex/dashboard-home-summary branch from 237dcbf to 567669e Compare November 9, 2026 23:14
@happy-v587
happy-v587 requested a review from frf12 as a code owner November 10, 2026 04:18

@hidb4ai hidb4ai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two Dashboard regressions reproduced against this commit with persisted SQLite data: the public Source reader crashes on missing save-time metadata, and Source rows attribute a sibling input's output to the wrong input. Details are inline.

@happy-v587
happy-v587 force-pushed the codex/dashboard-home-summary branch from 3cf5ef1 to d8dde9b Compare November 10, 2026 16:39
@happy-v587
happy-v587 force-pushed the codex/dashboard-home-summary branch from abed9ba to 75c3911 Compare November 11, 2026 02:54

@hidb4ai hidb4ai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed 75c3911e25364c093820477fe721361a0c5575c8: the four reported Dashboard issues are fixed in the exercised read and navigation paths.

The merge gate is still red: cindy-package fails test_standalone_cindy_hooks_recall_capture_and_isolate_sessions[gateway] because the second session returns allow instead of rewrite; CI result fails consequently. The same test passes locally at this head using the pinned Cindy 0.1.115 gateway source and a real TCP/SQLite Server, so I have not established that this is a PR regression. Please investigate or rerun the failed job and obtain a green required CI result before merging.

@hireview001 hireview001 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Resolve merge conflicts with the target branch.

@happy-v587
happy-v587 force-pushed the codex/dashboard-home-summary branch from 75c3911 to 448320c Compare November 12, 2026 06:11
@happy-v587

Copy link
Copy Markdown
Contributor Author

Addressed the outstanding gate items at aeba13c8:

  • License headers: the 12 new dashboard component templates flagged by Check License Header (home-attention.html, home-processing.html, processing-coverage.html, processing-period-fields.html, processing-steps.html, processing-topic-status.html, runtime-configuration.html, topic-diagnosis.html, topic-retry-form.html, token-comparison.html, work-followup.html, usage-records.html) now carry the Apache-2.0 header. CI preflight passes on the new head.
  • Merge conflicts: merge-tree against origin/master is clean and the PR reports MERGEABLE; no conflicting paths remain, so no rebase was required.
  • cindy-package / test_standalone_cindy_hooks_recall_capture_and_isolate_sessions[gateway]: this run has not reached that job yet. It passed at this head locally per the earlier review, so I am waiting for the rerun result before treating it as a PR regression.

Inline review threads from the previous rounds are all resolved; the remaining blocker is a fresh approval plus the required checks finishing on the new head.

@happy-v587

Copy link
Copy Markdown
Contributor Author

All required checks are green on 404e8bd0 (80 jobs completed, 0 failures, 60 passing checks, 21 skipped as not selected).

What changed since the last review:

  • aeba13c8 restored the Apache-2.0 header on the 12 new dashboard component templates, so CI preflight passes.
  • 5e8fb188 fixed tests/e2e/test_source_citation_locators.py::test_locators_survive_upgrade_reopen_http_and_mcp. The regression rewound pc_schema_revision to v1_5_0_003 but only dropped the table introduced by v1_5_0_004; with v1_5_0_005/v1_5_0_006 registered, their tables and indexes stayed installed and replaying the chain failed with index ix_pc_memory_processing_started already exists. The test now derives the tables to drop from the whole pending revision chain, so it keeps working as migrations are added. Reproduced locally before the fix and confirmed green after, plus tests/builtin/persistence (986 passed).
  • 404e8bd0 is an empty retrigger commit: the earlier run failed tests (3.13, e2e) only on test_model_ingress_authentication_with_real_core_and_provider[advisory-responses] with httpx.RemoteProtocolError: Server disconnected without sending a response. That file is untouched by this PR and the same suite passed on 3.11, 3.12 and 3.14, so it was a flake; it passes on the rerun.

Merge state: MERGEABLE, merge-tree against the current origin/master is clean (the branch is 5 commits behind but has no conflicting paths). All inline review threads are resolved.

The remaining blocker is the outstanding CHANGES_REQUESTED from the review on 4bc3bd4, whose four Dashboard findings are already fixed per the follow-up review. A fresh approval is needed to merge.

@hidb4ai hidb4ai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One current-head regression remains in feedback editing: saving a change to another field clears the existing reason from the latest feedback. Reproduction and required behavior are inline.

happy-v587 and others added 3 commits November 13, 2026 00:34
test(desktop): qualify rebased dashboard contract on SQLite

fix(dashboard): align rebased runtime and template checks

fix(dashboard): separate nav groups with a rule

fix(dashboard): read counts as singular when the count is one

Add singular label variants and a small plural helper so a one-item overview no
longer reads as "1 inputs", "1 records" or "1 failed runs".

fix(dashboard): give the sidebar a consistent two-level type scale

Section labels and the ungrouped home entry now share one top-level size and
weight, and grouped items sit one indent step below them, so a group heading can
no longer read as a disabled child.

fix(dashboard): keep section headings above their nav items

The left navigation rendered group labels at 11.2px while item labels used
14px, so the first level read smaller than the second. Section headings now
use 15px semibold and keep the secondary color for separation.

fix(dashboard): correct cross-scope usage and stale backlog

Count exact revision preparations across scopes only after authorizing the preparation and its complete read set. Keep old unresolved inputs visible outside the reporting window, and show incomplete scans without declaring an empty queue.

Update bilingual documentation and generated contracts, and restore the two Ruff complexity checks. Focused, adjacent regression and contract suites pass. Full make check remains blocked by four existing type diagnostics in unchanged files.

feat: expose memory processing outcomes, reasons and usage

Persist one Atomic Memory Source-window attempt in the same transaction as the
domain commit — status, stage, bounded error code, reconciliation decisions with
explanations, published results and retained artifacts — and expose per-Source,
per-revision, per-Scope and window-summary reads.

The Dashboard opens on an outcome overview: unresolved failures, completed
inputs, delivered context, explicit adoption, an input-to-adoption funnel, and a
needs-attention list. Waiting inputs are derived from the journal cursor so a
stalled queue cannot look healthy. Memory detail reports the period's
preparation count and last use, and a maintenance script reconciles recorded
results with stored artifacts.

Migrations: server_resources 1.4.1.007 (processing records) and 1.4.1.008
(context usage).
…eam run detail

Add a static cloud-native monitoring page under observation navigation covering
managed Docker Compose deployment, Server telemetry settings, Grafana/Phoenix
access, read-only verification and external platform connections. The page keeps
Dashboard authentication, requires no Scope or running monitoring stack, and
performs no deployment actions.

Split the Dream run detail into its own component and present Input, Processing,
and Output in reading order. Input shows up to 20 authorized exact Artifact
previews with identity and source references collapsed by default; the
processing stage retains recorded status, reason, error, timestamps and attempt
count; output links to the recorded candidate or states that no new output was
recorded. Unfinished tasks keep polling. Unselected sibling inputs no longer
leak into the detail view.

Tighten the processing detail type scale so nested sections inherit one
consistent size, and update bilingual documentation and labels.
Co-Authored-By: Claude Code <noreply@anthropic.com>
happy-v587 and others added 19 commits November 13, 2026 00:34
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
The upgrade regression rewound pc_schema_revision to v1_5_0_003 but only
dropped the table introduced by v1_5_0_004. Once v1_5_0_005 and v1_5_0_006
were registered, their tables and indexes stayed installed and replaying
the chain failed with "index ix_pc_memory_processing_started already
exists".

Derive the tables to drop from the pending revision chain so the
reconstructed layout stays a faithful older schema as migrations are added.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
The rebase onto master merged master's OpenAPI changes into this branch,
so the Desktop HTTP contract digest no longer matched any bundled
qualification record and the bundled business-profile check failed.

Record sqlite-dashboard-74082534-v1 from an actual built-wheel run: all
four SQLite modes passed against commit 7408253 with the normal
ConnectionManager and no ci-fixtures, and all 816 packaged runtime files
match the recorded Git source bytes.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@happy-v587
happy-v587 force-pushed the codex/dashboard-home-summary branch from 404e8bd to bd54aff Compare November 12, 2026 16:47
@happy-v587

Copy link
Copy Markdown
Contributor Author

Rebased onto the current master and all required checks are green again on bd54aff0 (80 jobs completed, 0 failures, 60 passing checks, 21 skipped as not selected).

The branch had drifted 13 commits behind and desktop/VALIDATION.md, desktop/src-tauri/src/connections/compatibility.json, desktop/src-tauri/src/transport/operations.json, desktop/ui/src/generated/operations.ts and src/powercontext/server/dashboard/navigation.py conflicted.

Resolution:

  • navigation.py: kept both sides. Master's new /dashboard/home return target stays, and this branch's /dashboard/notes reading route is added to the allowed set.
  • desktop/VALIDATION.md: kept every qualification record from both sides; no historical record was dropped or rewritten.
  • compatibility.json: kept all 65 master records and appended this branch's three records rather than picking one side.
  • operations.ts / operations.json: regenerated from the merged openapi/powercontext.yaml instead of hand-merging hashes. I first verified the replication against master's committed output — both files reproduce byte for byte from master's contract — so the regeneration is the same code path pnpm --dir desktop generate uses. The only changes are the new contract digest and the new memory.processing feature contract.
  • api.d.ts: regenerated the same way.

Merging master changed the HTTP contract digest, so the previously qualified record no longer matched and make contract-test failed. I ran a real qualification rather than relabeling: built the wheel from bd54aff0, built server_probe at Rust 1.95.0, and ran desktop/tests/real_server.py --product-qualification sqlite-dashboard-74082534-v1. All four SQLite modes passed (anonymous loopback, Bearer, HTTPS with explicit CA/base path, injected-provider/enforced) using the normal ConnectionManager without ci-fixtures; all 816 packaged runtime files match the recorded Git commit bytes. The record and a Server 74082534 Dashboard protocol qualification section are in desktop/VALIDATION.md. make contract-test is 68 passed.

merge-tree against origin/master is clean and the PR is MERGEABLE.

The only remaining blocker is the outstanding CHANGES_REQUESTED from the review on 4bc3bd4. Its four Dashboard findings were fixed in earlier commits, and every inline thread is resolved. A fresh approval is needed to merge.

The feedback editor rendered an empty textarea even when the record
already carried a reason, so changing only adoption submitted an empty
reason and the latest feedback lost its explanation while the historical
row stayed intact.

Prefill the editor from the saved reason. An explicit clear still submits
an empty value, and a regression covers editing adoption without
clearing the reason.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@happy-v587

Copy link
Copy Markdown
Contributor Author

Fixed in c1ca71c2.

The feedback editor's textarea had no value, so the form always submitted an empty reason even when the record already carried one. Changing only Adoption therefore wrote a new feedback record with reason: "" while the historical row kept its text — exactly the reported behavior.

The editor now prefills from the saved reason. An explicit clear still submits an empty value, so clearing remains possible.

Regression: test_editing_feedback_keeps_the_saved_reason_unless_cleared in tests/test_dashboard_usage.py. It reproduces through the Dashboard HTTP routes with persisted SQLite data, asserts the textarea carries the saved reason, edits only Adoption, and verifies both the rendered page and the two persisted pc_context_usage_feedback payloads still hold the reason; it then asserts an explicit clear still works. I confirmed the test fails against the unfixed template (assert '' == 'Used the region, but the deployment check still failed.') and passes with the fix. tests/test_dashboard_usage.py is 23 passed.

The review thread is resolved. The full CI suite is running on the new head.

happy-v587 and others added 2 commits November 13, 2026 08:00
The unsuccessful-inputs count covers every attempt that is neither started
nor succeeded, but its links asked only for `failed`. A Source whose only
unsuccessful attempt was cancelled or conflicted therefore opened an empty
list. The attempts list now accepts a repeated `status` parameter and the
links request all three counted statuses.

Home raises that alert from all recorded history, yet its detail link
inherited Home's selected period and hid attempts older than it. The summary
API now accepts an explicit `all_time=true`, Home's links carry the matching
all-history selection, and the Processing page offers the same option beside
its bounded periods.

Both directions are covered by a regression that records a recent and a
month-old cancelled attempt: the windowed link must show only the recent one
and Home's link must show both.

Co-Authored-By: Claude Code <noreply@anthropic.com>
The failure-navigation fix added a repeated `status` filter and an explicit
`all_time` summary window, so the OpenAPI digest changed and no bundled
profile matched it. Regenerate the Desktop operation tables and TypeScript
contract, then qualify all thirteen declared operations against a real
built-wheel Server.

The new record was produced by an actual four-mode SQLite run on macOS
26.5.2 arm64 with Python 3.14.7 and Rust 1.95.0, and all 816 packaged
runtime files match the recorded commit bytes. The previous record keeps
its own digest and evidence.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@happy-v587

Copy link
Copy Markdown
Contributor Author

Both P2 threads are addressed in c7492133 (and c328f926 for the Desktop contract requalification).

1. The alert and its destination now count the same statuses.
inputs_failed is seen_inputs - succeeded_inputs - pending_inputs, so it covers failed, cancelled, and conflict. The failure links previously asked only for status=failed, which opened an empty list whenever the attempt was cancelled or conflicted.

  • list_scope_memory_processing now accepts a repeated status parameter (style: form, explode: true), following the existing tag precedent on list_artifacts; duplicates and unknown values are rejected, and the signed cursor binds the whole selection.
  • The Dashboard uses one navigation token, run_status=unsuccessful, which requests all three statuses on both the Processing page and Home.
  • memory.processing is bumped to 1.1 for the changed request surface.

2. Home's all-history alert opens an all-history range.
Home counts with processing_summary(all_time=True), but its detail link inherited Home's default 7-day window, so an older failure was counted and then hidden.

  • The summary endpoint accepts an explicit all_time=true (rejects combining it with since/until) and reports since: null.
  • The Processing page gained an all window for attempts; the alert links carry processing_period=all with no start/end, and the summary caption and period picker handle the unbounded range.

Regression coverage: tests/test_dashboard_processing.py::test_failure_navigation_reaches_every_unsuccessful_attempt (fails before the fix in both dimensions) and tests/e2e/test_memory_processing_records.py::test_home_alert_opens_the_same_all_history_range_it_counted. Both review threads are resolved.

🤖 Generated with Claude Code

happy-v587 and others added 3 commits November 13, 2026 08:09
The persistence review digest covers every file under
src/powercontext/builtin/persistence, so accepting a repeated status in
the processing read requires an updated declaration. Record that the
filter is query-only: no table, column, index, revision, migration
resource or stored payload changes.

Co-Authored-By: Claude Code <noreply@anthropic.com>
The summary operation gained an explicit all_time query parameter, so the
committed DSH, OpenCode and Cindy bundles were stale against the generated
operation table. Rebuild them from the regenerated source; the only change
in each bundle is the added query parameter.

Co-Authored-By: Claude Code <noreply@anthropic.com>
launchd enforces a 10s minimum respawn interval even when the job declares
ThrottleInterval 1. Three failing attempts plus the token removal that
follows the last one therefore need about 20s, so the existing 20s deadline
left no margin and failed when the runner was slow. Keep the same predicate
and give it a deadline that covers the documented throttle.

Co-Authored-By: Claude Code <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.6.0 v1.6.0 release tracking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants