Skip to content

feat(webui): MK3 data-quality chips and informability (#956) - #1127

Merged
Sinity merged 2 commits into
masterfrom
feature/feat/webui-aesthetics-pass
May 17, 2026
Merged

Sinity merged 2 commits into
masterfrom
feature/feat/webui-aesthetics-pass

Conversation

@Sinity

@Sinity Sinity commented May 17, 2026

Copy link
Copy Markdown
Owner

Summary

Brings the daemon web reader part-way onto the MK3 informability story
from docs/design/mk3/: a shared data-quality chip vocabulary, a
tri-state FTS readiness chip, a new session-insight freshness chip, the
MK3 conversation-header chip order, context-preserving sidebar empty
states, and disabled-action tooltips on the workspace toolbar.

Investigation finding

Issue #956 was previously closed as "deferred to MK2" and reopened. A
prior agent investigation on #848 found the reader is "comprehensively
built up." Audit confirmed the reader substrate (three-column layout,
facet bar, marks/annotations/saved views/workspaces, inspector tabs,
stack/compare workspaces) is shipped. What was missing per the
strengthening pass on #956 was the explicit state language MK3 specifies
(docs/design/mk3/docs/08-state-matrix.md,
docs/design/mk3/docs/11-little-details.md): the operator could not
tell at a glance whether data was canonical, partial, stale, or
unavailable; the FTS chip collapsed partial readiness into the ok
bucket; sidebar empty-states blurred "no archive" with "filter is
restrictive"; workspace actions were always-enabled with no signal when
context was insufficient.

This PR is the smallest concrete slice that lands the MK3 vocabulary
and applies it to the three highest-signal status surfaces. The issue
remains open: layouts, density modes, theme, TOC/outline, and per-panel
persistence per the MK3 view inventory are not in scope for this PR.

What changed

polylogue/daemon/web_shell.py

  • New CSS class system .chip.q-<state> covering the MK3 chip
    vocabulary: canonical, inferred, heuristic, explicit, unresolved,
    repaired, stale, partial, estimated, unavailable, redacted. Each has a
    distinct color hook keyed to the existing --ok / --warn / --err
    / --accent / --text-dim tokens; the renderer applies them via a
    small setChipQuality(el, quality) helper that strips any prior
    q-* class.
  • renderFtsChip(fts) replaces the binary ok / -- render with a
    tri-state read of fts_readiness.messages_ready AND
    fts_readiness.action_events_ready: both → FTS: ok (canonical),
    exactly one → FTS: partial (partial), neither → FTS: unavailable
    (unavailable).
  • New renderInsightChip(freshness) and #status-insights chip
    reading insight_freshness.sessions_with_profiles / total_sessions: 100% → canonical, 1..99% → partial, 0% with
    total>0 → stale. Hidden when total=0 so empty archives stay quiet.
  • Conversation header chip order rewritten per MK3 spec (provider →
    live/stale → repo/cwd/branch → counts → cost/tokens → derived/insight
    → marks/tags). Provider chip now tagged q-canonical so the
    source-of-truth identifier visually anchors the header. Added
    graceful surfacing of branch_type, cost_usd (with
    cost_estimated → q-estimated), token_count, insight_status
    (missing → q-unavailable, stale → q-stale), and stale derived
    view. Existing fields preserved; chips are emitted only when the
    underlying field is present.
  • Sidebar empty-states now distinguish empty archive from filtered
    no-results and preserve filter context with a concrete next action.
    Old "No conversations match" replaced with for example
    No results for query=foo provider=chatgpt. Press Esc to clear. and
    No conversations in archive. Run \polylogued run` to ingest sources.`

polylogue/daemon/web_shell_workspace.py

  • Disabled-state CSS for #workspace-toolbar buttons.
  • renderWorkspaceToolbar now toggles [disabled] plus an explanatory
    title= on Stack, Compare, Save, and Recall buttons when
    selectedConversationIds() is too small to support the action.
    Examples: Compare needs two conversations to align, Recall pack needs at least one open conversation. Per MK3 "disabled actions are
    part of the design" rule.
  • Degraded-count workspace stat now also flips a q-partial class.

tests/unit/daemon/test_web_reader.py

  • New TestReaderInformability class with five tests pinning the new
    surfaces against JS source (matching the file's existing
    semantic-selector style): chip vocabulary defined, FTS tri-state
    render present, insight chip render present, sidebar empty-state
    preserves filter context, workspace disabled-state tooltips present,
    header chip order follows MK3 spec.

Non-goals (deferred — issue stays open for these):

Verification

  • nix develop -c pytest tests/unit/daemon/test_web_reader.py -x -q →
    57 passed in 9.52s (52 prior + 5 new informability tests).
  • nix develop -c ruff check polylogue/daemon/web_shell.py polylogue/daemon/web_shell_workspace.py tests/unit/daemon/test_web_reader.py
    → All checks passed!
  • nix develop -c ruff format --check on the three files →
    3 files already formatted.
  • nix develop -c mypy polylogue/daemon/web_shell.py polylogue/daemon/web_shell_workspace.py tests/unit/daemon/test_web_reader.py
    → Success: no issues found in 3 source files.
  • nix develop -c devtools verify --quick → green after the included
    topology-status drift regen (pre-existing on origin/master, confirmed
    by stash-test).

Ref #956

🤖 Generated with Claude Code

Sinity and others added 2 commits May 17, 2026 02:26
Adds the MK3 chip-quality CSS vocabulary (canonical/inferred/heuristic/
explicit/unresolved/repaired/stale/partial/estimated/unavailable/redacted)
to the daemon web reader and applies it to the three highest-signal
surfaces: FTS readiness (tri-state instead of binary), session insight
freshness (new status chip), and conversation-header chip order per
docs/design/mk3/docs/11-little-details.md.

The sidebar empty-states now distinguish empty archive from filtered
no-results and preserve filter context with a concrete next action.

Workspace toolbar Stack/Compare/Save/Recall buttons expose a disabled
state with explanatory tooltips when context is insufficient, per the
MK3 "disabled actions are part of the design" rule.

Ref #956

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
`devtools render-topology-status` reports an off-by-one realized file
count vs the committed docs/topology-status.md (was 748, now 749).
Pre-existing drift on origin/master surfaced by the pre-push gate;
unrelated to the webui aesthetics work in the prior commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented May 17, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@Sinity has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 19 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7af5da2b-b55b-4a0f-9864-5944872c93fb

📥 Commits

Reviewing files that changed from the base of the PR and between 3f47836 and 1d48c5d.

📒 Files selected for processing (4)
  • docs/topology-status.md
  • polylogue/daemon/web_shell.py
  • polylogue/daemon/web_shell_workspace.py
  • tests/unit/daemon/test_web_reader.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/feat/webui-aesthetics-pass

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Sinity
Sinity merged commit a6865e6 into master May 17, 2026
3 checks passed
@Sinity
Sinity deleted the feature/feat/webui-aesthetics-pass branch May 17, 2026 00:28

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1d48c5d872

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread polylogue/daemon/web_shell_workspace.py Resolved
@Sinity

Sinity commented Sep 30, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

Only the rows listed above are dispositioned. Held findings remain open.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant