Skip to content

feat(logs): accept Codex thread links in conversation filters - #6734

Merged
lidge-jun merged 6 commits into
lidge-jun:devfrom
luvs01:pr711-codex-thread-links
Oct 9, 2026
Merged

lidge-jun merged 6 commits into
lidge-jun:devfrom
luvs01:pr711-codex-thread-links

Conversation

@luvs01

@luvs01 luvs01 commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Accept pasted codex://threads/<id> links in the dashboard Conversation filter, GET /api/logs?conversationId= (and its conversation alias), and ocx logs filter --conversation. Query/fragment metadata, trailing slashes, surrounding whitespace and prefix case are handled while preserving thread-id case. The original trimmed query remains a second candidate, so bare ids and whole-literal-URI digests stay searchable. Malformed or trimmed links over 512 characters remain ordinary queries, subject to the existing 4096-character digest-input bound. Persistence is unchanged.
  • Preserve Devin AI's four original commits, author dates and source cherry-pick references, plus the required structure-contract paragraph. A normal integration commit brings the branch onto upstream dev bf9ecf3d79c7b1b6436e2922f52d421ab550b744, including its separate layout-ratchet fix and runtime/test-runner Bun pins. The feature diff against dev remains 10 files, 235 additions / 22 deletions. No timeout, skip, file-size cap or exemption workaround was added.

Source commits: 19a0f3545d74bf6b95e677e95412bd915f3c7412, 6d8225fc92bccdd85140f3283120f8f5f520d4c4, 0df83357939097d6c72853a29c8160476695cb74, a600bf259bff2d0fa916db18a509d5fdbe729ecd.

Verification

Current published head: ca2391373f10795bf9270ba388344bec2ec2301f, tree 7181068612242434cb71182f8f372be189be7348, parents published 0555d0cb and upstream dev bf9ecf3d. Linux used the repository's Bun 1.4.0 test runner, Bun 1.4.2 runtime, and Node 24.19.0. Dependencies were reused from a successful frozen install with byte-identical current manifests/locks; no dependency files changed. Current upstream dev is e6c6e13a22e465812f509a423990e9f09e32b1d0, 10 commits ahead of the integrated base. This meets the repository readiness gate's documented maximum of 10; the newest 400-file upstream union has not been locally integrated or validated in this PR.

  • Backend conversation regression: 17 pass; CLI/usage four-file group: 172 pass; GUI focused three-file group: 59 pass, directly rerun.
  • Strict typecheck, doctor-memory/Docker-smoke TypeScript contracts, privacy scan, structure and skill-surface checks, GUI lint/i18n/build, docs build, release-helper syntax build and CLI help passed.
  • Synthetic server/API/GUI/CLI matrix: 37 cases / 261 assertions, on both pinned Bun versions, with 29 stub CLI requests and 0 provider requests per run. It covers query/fragment metadata, trailing slashes, whitespace/case, malformed input, 512/513 and 4096/4097 boundaries, bare ids and literal-URI digest compatibility. Invalid CLI input rejects before fixture transport.
  • Aggregate shell/layout/ratchet/hygiene/test-runner contracts: 121 pass, nine files. Layout is now 1,955 lines and matches upstream dev exactly; the former 2,000-line ratchet is cleared in this integration.

Conversation filter with a synthetic copied thread link

  • cd gui && bun run test --isolate: 3,005 pass, 332 files.
  • The former timeout batch's same 12 files, with unchanged 120-second process / 60-second test deadlines: 244 pass, 7.77s. The former ratchet batch's current 12-file configuration: 396 pass, 2.51s.
  • bun run test:changed --timeout=60000: 13,945 pass / 37 skip / 95 fail / 0 unhandled errors, 14,077 tests across 602 files, 348.42s, exit 1. This is not a full-suite pass.
  • A new matched comparison reran only the 18 files containing the original 95 broad failures, with the same Bun 1.4.0 runner, isolated 4-file parallelism, 60-second test deadlines and credential-scrubbed fixture environment. PR head: 767 pass / 93 fail, 860 tests, 110.52s, exit 1. Exact clean integrated dev base bf9ecf3d: 766 pass / 94 fail, the same 860 tests, 110.01s, exit 1. All 93 currently failing PR cases also fail on that exact base; zero candidate-only failing names. Both runs remain red.
  • 94 of the original 95 names reproduce on the exact base. The remaining responses-compaction-routing native-combo seed case passed on both in the new comparison, and previously failed on clean historical base bbab02ab. Its intermittent seed/timing cause is unresolved; it is not claimed fixed. A plaintext headerless drip-feed timing case failed only on the base in this pair and had failed in the original broad PR run. Timing risks remain.
  • The separate four-file catalog comparison (39 pass / 55 fail on both candidate and clean base) has zero failing-name overlap with these 95. It cannot establish reproduction of these 95; the new matched 18-file comparison above supplies that evidence. No matched 602-file current-base broad run was repeated. Fixed system /tmp ownership refusals appear directly in several failure blocks; not every secondary assertion's cause is established. No guard, ownership, timeout or skip bypass was applied.

Local validation scope exception: the full bun run test suite is the default before review readiness. It was not repeated here because several prior roughly 600-file runs already took 345–348 seconds each and showed recurring ownership and timing failures on clean baselines in this managed environment. Instead, all changed-behavior regressions, direct GUI/API/CLI boundary checks, the complete GUI suite, strict typecheck, privacy/structure/lint/build gates, and the uncertain 18-file candidate/base comparison were run. This satisfies the documented focused-regression minimum under the resource exception, with broader red results and untested coverage retained above. It does not attest that the complete local repository suite passes.

The exact paired command was bun scripts/test.ts --timeout=60000 followed by these same 18 paths on each worktree (candidate ca2391373f10795bf9270ba388344bec2ec2301f; clean base bf9ecf3d79c7b1b6436e2922f52d421ab550b744):

tests/claude-integration/claude-desktop-first-party-guards.test.ts
tests/claude-integration/claude-desktop-first-party.test.ts
tests/claude-integration/claude-desktop-picker-routes.test.ts
tests/claude-integration/claude-desktop-picker.test.ts
tests/claude-integration/claude-intercept-proxy-auth.test.ts
tests/claude-integration/claude-messages-endpoint.test.ts
tests/claude-integration/claude-picker-runtime.test.ts
tests/claude-integration/claude-picker-startup.test.ts
tests/codex-integration/codex-catalog.test.ts
tests/codex-integration/codex-convergence-contract.test.ts
tests/codex-integration/codex-coordinator-doctor.test.ts
tests/codex-integration/native-codex-toggle.test.ts
tests/codex-integration/native-profile-drain-server.test.ts
tests/config/settings-stream-mode.test.ts
tests/responses/responses-compaction-routing.test.ts
tests/routing/combo-management-api.test.ts
tests/server/loopback-listener-integration.test.ts
tests/server/plaintext-v2-agent-messages-server.test.ts

Historical exact 0555d0c checks: Cross-platform CI 37716613109 finished 14 successful jobs / 3 failed / 8 skipped. Shard 2 batch 4/56 failed the unchanged 2,000-line layout ratchet; shard 1 batch 4/52 hit the 120-second multi-file timeout, and final ci aggregate failed. The workflow's automatic single-file attribution passed all 12 timeout-batch files, but the shard stopped early. These are historical results, not current-head validation. React Doctor 37716612981 passed on 0555.

Timeout analysis localizes the historical stall after the first two GUI typecheck-gate assertions, before its synchronous child-process case. On unchanged 0555 files, the same 12-file batch passed 244 tests locally under unchanged 120-second process / 60-second test deadlines; a randomized seed 2 run also passed with cold-spawn warmup preceding the GUI gate. No proven shared-state/handle-release bug justified a speculative source rewrite. The current-head hosted run below completed successfully without changing those deadlines. This single successful run does not establish the historical timeout's root cause or eliminate timing-dependent risk.

Current-head Cross-platform CI 37725885408 completed successfully: 17 successful jobs / 0 failed / 8 skipped. All four test shards and the final ci aggregate passed on ca2391373f10795bf9270ba388344bec2ec2301f. Structure, gates, docs, API usage, storage policy, Docker and selected npm/keyring smokes passed. Current-head React Doctor 37725885435, hygiene and target checks also passed. Native Windows/macOS suites were skipped by path scope; those skips are not passing native test evidence. CodeRabbit subsequently reviewed all 10 files against this exact head (review marker ca2391373f10795bf9270ba388344bec2ec2301f) and reported no actionable comments. The live review-thread query returned zero threads. Its generic docstring-coverage warning remains 70% against an 80% threshold; this is disclosed as an advisory warning, not a passed check or a fixed finding.

The complete backend repository suite and native Windows/macOS behavior were not run locally. No live provider validation or paid provider/API calls were performed. Author minimum local validation is complete under the documented resource exception. Human review is requested for this published head with the red local suites, skipped native coverage, intermittent seed/timing uncertainty and docstring warning explicitly retained. This is a review-readiness claim, not a full-local-suite or merge-approval claim. No PR merge or force-push was performed.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Summary by CodeRabbit

  • New Features
    • Conversation filters in the dashboard, request logs, and CLI now accept pasted codex://threads/<id> links. Links with query parameters or fragments are also supported, and searches can match the extracted thread ID or the original link.
  • Documentation
    • Updated the web dashboard guide to explain how pasted thread links are handled and how they relate to conversation filtering.

devin-ai-integration Bot and others added 5 commits October 8, 2026 01:23
Codex's copy-session-link clipboard carries a codex://threads/<id> deep link while clients send the bare thread id on the wire. Unwrap the wrapper inside the shared conversation matcher so the Logs conversation field, /api/logs?conversationId, and ocx logs filter --conversation all match the bare id (direct or via its persisted digest) without changing what is persisted.

Co-Authored-By: Epinephrine <luvs01@hanmail.net>
(cherry picked from commit 19a0f35)
Review feedback on #711: codex://threads/<id>?hostId=… pastes kept the
query string in the candidate id so neither raw-id nor digest matching
worked, and the lazy-wildcard regex had quadratic backtracking on
malformed slash-flooded inputs run per log row.

unwrapLogConversationQuery is now a bounded (512-char) linear scan: cut
at ? or #, strip trailing slashes, and only return a single-segment id.
Regression cases cover durable and percent-encoded remote-control hostId
values across the dashboard matcher, GET /api/logs conversationId, and
ocx logs filter --conversation.

Co-Authored-By: Epinephrine <luvs01@hanmail.net>
(cherry picked from commit 6d8225f)
Devin Review on #711: a client that literally sends a codex://threads/…
session id has it hashed whole for storage, but unwrapping the paste
before hashing meant that digest could never match again — the unwrap
must add a match path, not replace one.

logConversationQueryCandidates now yields the unwrapped id AND the
untouched paste; the server matcher tries each (direct + digest) and the
GUI hashes every candidate so filterLogs gets both digests.

Co-Authored-By: Epinephrine <luvs01@hanmail.net>
(cherry picked from commit 0df8335)
React Doctor flagged the sequential await-in-loop in
hashLogConversationQuery; candidates are independent, so map them
through crypto.subtle.digest concurrently and keep result order.

Co-Authored-By: Devin AI <devin-ai-integration[bot]@users.noreply.github.com>
(cherry picked from commit a600bf2)
Record the conversation filter contract for the work from #711, including literal URI compatibility and input bounds. The four original commits remain separately cherry-picked with their author identities and source SHA trailers.

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Epinephrine <27862058+luvs01@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 92c8e595-a5a0-4cc0-a2b7-27cdc8371a72
📥 Commits

Reviewing files that changed from the base of the PR and between bf9ecf3 and ca23913.

📒 Files selected for processing (10)
  • docs-site/src/content/docs/guides/web-dashboard.md
  • gui/src/log-conversation-id.ts
  • gui/src/pages/Logs.tsx
  • gui/src/pages/logs-filter.ts
  • gui/tests/logs-filter-bar.test.ts
  • gui/tests/logs-filter.test.ts
  • src/server/request-log-conversation.ts
  • structure/dashboard-and-usage.md
  • tests/cli/cli-log-view-filter.test.ts
  • tests/usage/request-log-conversation.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Conversation filters in the server and browser now accept Codex thread links. They match using the extracted thread ID and the trimmed original query. The browser stores hashes for multiple query candidates. Documentation and tests cover the updated behavior.

Changes

Conversation filter thread links

Layer / File(s) Summary
Server query matching and coverage
src/server/request-log-conversation.ts, tests/cli/cli-log-view-filter.test.ts, tests/usage/request-log-conversation.test.ts, structure/dashboard-and-usage.md, docs-site/src/content/docs/guides/web-dashboard.md
The server extracts a thread ID from valid links up to 512 characters and checks both the extracted ID and trimmed original query against stored values or normalized hashes. CLI and request-log tests cover link queries. Documentation describes the filter behavior.
Browser query matching and state
gui/src/log-conversation-id.ts, gui/src/pages/Logs.tsx, gui/src/pages/logs-filter.ts, gui/tests/logs-filter.test.ts, gui/tests/logs-filter-bar.test.ts
The browser extracts thread IDs and hashes eligible query candidates. Filter state now stores a readonly array of hashes. Tests cover link parsing, candidate matching, log filtering, and the updated state shape.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Suggested reviewers: lidge-jun

Merge Risk: ⚪ Minimal · up to ca239

Pasted Codex thread links now filter conversations in the dashboard, the API, and the CLI. I found no concrete merge-blocking risk in the supplied changes.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 70.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 8 files. (2 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: conversation filters now accept Codex thread links.
Full details: Docstring Coverage

Explanation

Docstring coverage is 70.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 8 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the enhancement New feature or request label Oct 8, 2026
@luvs01
luvs01 marked this pull request as ready for review October 8, 2026 21:21
@chatgpt-codex-connector

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@lidge-jun
lidge-jun merged commit 37e9294 into lidge-jun:dev Oct 9, 2026
54 checks passed
@lidge-jun

Copy link
Copy Markdown
Owner

Maintainer integration record (MAINTAINERS.md, dev exception): merged into dev as 37e9294 by squash with admin, on the maintainer's instruction to integrate this sweep.

  • Exact head: ca2391373f10795bf9270ba388344bec2ec2301f. All triggered checks passed on that head (23 pass, 8 skipped, none failed, cancelled or pending). It was MERGEABLE with no open review threads.
  • Union check: this head merged with --no-ff onto dev bb36029ef9 (tree 436eff12c5, no conflicts). On the union, tests/usage/request-log-conversation.test.ts and tests/cli/cli-log-view-filter.test.ts had 96 pass, the GUI logs-filter tests had 28 pass, bun run typecheck was clean, and bun run structure:check passed. structure/dashboard-and-usage.md sits exactly at its 600-line budget.
  • Independent review: PASS. One minor follow-up: the oversized-input tests would not catch a higher 512-character unwrap limit, and mixed-case thread IDs are not covered.

Thanks @luvs01 for the contribution.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants