Repository navigation
feat(reader): bulk operations on conversation selection (#1119) - #1162
Conversation
Add multi-select UI in the daemon web reader with bulk tag (star/pin/
archive), JSON export, and preview-gated delete/re-embed. Per-conversation
status envelope (succeeded/failed/skipped + dryRun + action) surfaces
real outcomes instead of opaque aggregate counts.
The bulk surface is purely client-side composition over existing daemon
endpoints — tag mutations issue per-conversation POSTs to /api/user/marks,
export streams /api/conversations/{id} into a JSON bundle. Delete and
re-embed are exposed only through a preview overlay; confirming records
no_endpoint skip entries because the daemon has no DELETE-conversation
or re-embed route yet. Keeping the AC contract honest beats silently
appearing to mutate state.
Extract bulk CSS/HTML/JS into polylogue/daemon/web_shell_bulk.py to keep
web_shell.py under the file-size budget, mirroring the existing
web_shell_workspace.py split pattern. Topology projection refreshed.
Verification: devtools verify --quick (exit 0), pytest
tests/unit/daemon/test_web_reader.py (66 passed).
Closes #1119
|
Warning Rate limit exceeded
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 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cc533a4e1f
ℹ️ 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".
|
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. |
Summary
Multi-select UI in the daemon web reader (
polylogue/daemon/web_shell.py)with bulk tag (star/pin/archive), JSON export, and preview-gated
delete/re-embed. Each bulk operation produces a typed per-conversation
status envelope (
succeeded,failed,skipped+dryRun+action)so the operator sees partial-success outcomes instead of opaque aggregate
counts.
Problem
#1119 asked for bulk operations on result sets — select N conversations,
then apply tag/export/delete/re-embed with partial-success reporting and
explicit preview gates on destructive ops. The reader had no
multi-select primitive at all; only single-conversation interactions
existed.
Solution
are checkbox-selected. Provides "Select all" / "Clear" and
per-action buttons.
/api/user/marksPOSTs per conversation(centralized tag mutation contract, refactor(mutations): centralize tag metadata and delete contracts #862-aligned). Idempotency
surfaces as
skipped: already_taggedinstead of failing./api/conversations/{id}for each selected id,bundles them into a single JSON blob, and triggers a browser
download via
URL.createObjectURL.conversations and an explanatory body. Confirming records a
dryRun=trueenvelope with oneskipped: no_endpointentry perconversation — the daemon has no delete-conversation or re-embed
route yet, so the UI refuses to silently appear to mutate state.
This keeps the AC contract honest until the substrate routes land.
polylogue/daemon/web_shell_bulk.pyholds the bulk CSS, HTMLfragments, JS, and
attachBulkHandlers(). Same split pattern asweb_shell_workspace.py— keepsweb_shell.pyunderdocs/plans/file-size-budgets.yamlceiling and lets the bulksurface evolve without churning the shell.
Alternatives considered:
/api/conversations/bulk-*route would have allowedatomic envelopes, but the scoped owners for
polylogue/daemon/http.pyand
user_state_http.pyare other lanes. Composing existingendpoints client-side respects that boundary while still satisfying
the AC contract (per-conversation envelope, preview gate).
web_shell.pywould have pushed it pastthe 1100 LOC ceiling; the workspace split pattern was the natural
precedent.
Verification
New tests in
tests/unit/daemon/test_web_reader.py::TestReaderBulkOperations:test_bulk_toolbar_regions_present_in_shell— every load-bearingregion hook (toolbar, preview overlay, JS handlers,
no_endpointmarker) is present in the served HTML.
test_bulk_envelope_keys_documented_in_shell— envelope field names(
succeeded/failed/skipped/dryRun/action) are referenced inthe shipped JS so they can't drift silently.
test_bulk_tag_drives_existing_marks_endpoint— simulates thebulk-tag loop server-side; locks the contract that
/api/user/marksaccepts the payload shape the bulk JS emits.test_bulk_export_uses_conversation_detail_endpoint— pins that/api/conversations/{id}returns the detail payload export iscomposed from, for every selected id.
Acceptance criteria
/api/user/marks)already_tagged), and dry-run path (no_endpoint)Deferred (no open issue blocked on this PR):
with the substrate owners; the preview overlay and
no_endpointenvelope are the honest stand-in until those land.
Closes #1119