Skip to content

Add opt-in chat sorting by latest delivered result - #19

Open
priva7eer wants to merge 1 commit into
Netroforge:mainfrom
priva7eer:feat/latest-result-sorting-pr
Open

priva7eer wants to merge 1 commit into
Netroforge:mainfrom
priva7eer:feat/latest-result-sorting-pr

Conversation

@priva7eer

Copy link
Copy Markdown

Summary

When several conversations run in parallel, session-index dates do not necessarily bring newly delivered results to the top of the chat list. Add optional codexExtras.chatSortOrder: latestResult, preserving the existing workspace groups and recent index-date sorting as the default.

Sort by the timestamp of the last explicit task_complete event. Opening, focusing, reading, starting work, questions, and streamed tokens cannot change the order. A newly completed result moves its conversation up only within its workspace group. Equal or missing result times use stable session IDs; undated results appear below dated ones.

  • Cache reads of at most the final 256 KiB per session log and refresh via scoped, debounced VS Code file events.
  • Remember observed completion times in extension storage, so a new turn or window reload cannot lose a previously seen result outside the log-tail budget.
  • A completion outside that tail can be unknown on first observation; this limitation is documented.
  • Setting changes apply immediately. Default mode keeps metadata-only reads; result sorting requires neither live IPC nor status icons and does not modify transcripts.

Independent of #13, #15, #16, and #17. No dependencies, version bump, or generated build artifacts.

Closes #18

Validation

  • Windows / Node 24.14.0: npm test (20/20) and npm run package -- --out codex-extras-results.vsix.
  • Ubuntu via WSL / Node 22.23.3: npm test (20/20) and npm run package -- --out codex-extras-status-ci.vsix. Dependencies installed from cache using --offline --ignore-scripts --no-audit --no-fund because WSL DNS was unavailable.
  • Tests cover workspace boundaries, stable order after opening and work starts, a new completion moving a row, persistent completion times beyond the bounded tail after reload, default-sort restoration, watcher coalescing/disposal, malformed/partial records, truncation/deletion, and manifest defaults.
  • The combined local development build also passes 52 tests on Windows and Linux. The independent PR excludes unrelated features.
  • git diff --check passes.

Checklist

  • The change is focused and contains no unrelated files.
  • npm test passes.
  • npm run package succeeds.
  • User-facing behavior is documented.
  • CHANGELOG.md is updated when appropriate.
  • No credentials, personal data, or generated build artifacts are committed.

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.

Optional chat sorting by the latest delivered result

1 participant