Skip to content

feat(reader): message card action rail + fold policies + keyboard shortcuts (#1202) - #1328

Merged
Sinity merged 1 commit into
masterfrom
feature/feat/reader-action-rail-1202
May 18, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/feat/reader-action-rail-1202

Conversation

@Sinity

@Sinity Sinity commented May 18, 2026

Copy link
Copy Markdown
Owner

Summary

First MK3 reader slice on the daemon web shell (#1202). Each message
card now carries a five-action rail (copy text, copy link, open raw,
view provenance, jump-to-anchor), default fold policies for tool calls
/ tool output / thinking blocks / code blocks, and the documented
keyboard shortcut set (j/k/o/c/?/Esc).

Problem

The MK3 reader (Q3 head) target spec called for message-card affordances
that the existing daemon reader did not expose. Operators reading old
conversations had no per-message clipboard, no way to deep-link an
anchor, and no way to fold the dominant noise sources (long tool
outputs, raw thinking dumps, large code blocks). Keyboard navigation
stopped at the conversation list — once a conversation was open there
was no way to move between message cards or copy the focused one.

Solution

  • New module polylogue/daemon/web_shell_reader.py owns the slice: CSS
    for the rail + fold UI, JS for renderMessageBlocks, fold/clipboard
    helpers, and a installReaderShortcuts capture-phase handler.
  • polylogue/daemon/web_shell.py is wired via three new placeholders
    (__READER_CSS__, __READER_HELP_HTML__, __READER_JS__); the
    legacy inline messageBlocksHtml is replaced by a thin delegating
    shim and the base j/k handler defers to the slice when a
    conversation is loaded so message-card and sidebar navigation never
    double-fire.
  • Fold policy: tool_use/tool_result and role==='tool' collapse to
    a labelled summary chip with command snippet and word count;
    thinking blocks render the documented [thinking] marker plus word
    count; fenced ``` code blocks fold per-block with language tag and
    line count.
  • Action rail anchors lean on the existing reader_anchor /
    actions payload contract already produced by
    polylogue/surfaces/payloads.py, so the slice is purely a
    presentation extension.
  • Out of scope: the mark for context-pack expansion described in the
    issue body was vetoed by the issue thread (belongs to feat(context): build project/date/query context packs for agent analysis #838) and a
    continue-thread-in-agent action is its own scope. Neither is
    implemented here.

Modules touched:

  • polylogue/daemon/web_shell.py — placeholder wiring, j/k handover
  • polylogue/daemon/web_shell_reader.py — new slice
  • tests/visual/test_reader_action_rail.py — new DOM-shape contract
  • docs/plans/topology-target.yaml, docs/topology-status.md — new
    module registered via devtools build-topology-projection

Verification

pytest tests/visual/test_reader_action_rail.py -x -q
# 1 passed in 9.00s
pytest tests/visual/test_reader_dom_smoke.py -x -q
# 8 passed in 11.92s
devtools verify --quick
# total_duration_s: 49.54, exit_code: 0

devtools verify --quick was clean only after refreshing the
generated docs (docs/cli-reference.md, docs/test-quality-workflows.md,
docs/verification-catalog.md, .cache/site) that drifted on master
before this branch; those refreshes were applied and reverted to no-op
diffs.

Closes #1202

…rtcuts

First MK3 reader slice landed on the daemon web shell. Adds a per-message
action rail (copy/link/raw/provenance/anchor), fold policies for tool
calls, tool output, thinking blocks, and per-block code folds, plus the
documented j/k/o/c/?/Esc keyboard shortcut set.

Implementation lives in polylogue/daemon/web_shell_reader.py and is
wired into web_shell.py via __READER_CSS__/__READER_HELP_HTML__/
__READER_JS__ placeholders. The existing j/k sidebar handler now
defers to the reader slice when a conversation is loaded so message-
card navigation and conversation-list navigation do not double-fire.

Pinned by tests/visual/test_reader_action_rail.py.

Closes #1202
@Sinity
Sinity merged commit d3b33d1 into master May 18, 2026
1 check was pending
@coderabbitai

coderabbitai Bot commented May 18, 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 52 minutes and 41 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: 7726e895-483e-459b-aff7-1bcd1ed9e1ba

📥 Commits

Reviewing files that changed from the base of the PR and between 9f6978b and ac38862.

📒 Files selected for processing (5)
  • docs/plans/topology-target.yaml
  • docs/topology-status.md
  • polylogue/daemon/web_shell.py
  • polylogue/daemon/web_shell_reader.py
  • tests/visual/test_reader_action_rail.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/feat/reader-action-rail-1202

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 deleted the feature/feat/reader-action-rail-1202 branch May 18, 2026 15:56

@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: ac388628d9

ℹ️ 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_reader.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.

feat(reader): message card action rail, fold policies, keyboard shortcuts

1 participant