Skip to content

Add sorting options to the Monitor view - #247

Merged
minchenlee merged 7 commits into
minchenlee:mainfrom
bnjdpn:feature/monitor-sort
Nov 18, 2026
Merged

minchenlee merged 7 commits into
minchenlee:mainfrom
bnjdpn:feature/monitor-sort

Conversation

@bnjdpn

@bnjdpn bnjdpn commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add a sort selector to the Classic Monitor so users juggling multiple sessions can find a project by name or see which project was active most recently.

  • Attention first keeps the existing order and is the default.
  • Project (A–Z) orders projects by their displayed names, or sessions by project within each status in Show All.
  • Last active orders projects by their latest session activity and sessions newest first within each status bucket.

The selection is saved locally and applies across Project, Show All, and Dense views.

Testing

  • npm run check
  • npm run lint:data and npm run test:lint-data
  • node --test scripts/test-dense-layout.mjs (7 passed)
  • Vite production build completed. Added Playwright coverage for the dropdown, sort order, and preference storage. The local browser could not launch, so the browser assertions remain unverified.

Visual baselines

The new selector intentionally changes Classic Monitor screenshots. Before/after capture and regeneration of the affected baselines on the macOS WebKit runner are pending.

@bnjdpn
bnjdpn marked this pull request as ready for review November 12, 2026 16:24
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T16:30:39.959649Z b35db79 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

ℹ️ 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 tests/visual/classic/monitor.spec.ts Outdated
const sort = page.getByRole('combobox', { name: 'Sort sessions' });
const projects = page.locator('.project-section .project-name');

await expect(projects).toHaveText(['web-app', 'api-server', 'cli-tools']);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Correct the default-order assertion in the sorting test

With the default fixtures loaded by openClassic(page), both api-server and web-app need attention, but only api-server also has an idle session. sortGroups() in src/routes/(app)/+page.svelte:355-357 prioritizes that idle bucket before modification time, so the actual initial order is ['api-server', 'web-app', 'cli-tools'], unchanged from the parent commit. This assertion therefore fails before either new sort option or preference persistence is tested; update its expected order to match the preserved default behavior.

Useful? React with 👍 / 👎.

bnjdpn commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

@codex address that feedback

sortGroups() ranks a project that has an idle session ahead of one that
only needs attention, so the default fixtures order is api-server,
web-app, cli-tools.

Co-authored-by: Benjamin Dupin <bnjdpn@users.noreply.github.com>

bnjdpn commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

@minchenlee Addressed the Codex feedback in 5de2864: the default-order assertion now matches sortGroups() (api-server, web-app, cli-tools). npm run check and the related Playwright tests pass. Ready for review when you have a moment.

minchenlee and others added 2 commits November 17, 2026 15:07
…headers on one line

The sort select used the native macOS look. It now has the same square
box as the view toggle, with a drawn arrow. Below 768px it shows the
arrow only and the attention badge uses its short label, so the header
does not wrap.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FXb4ofqTMSGwAYLtBKW82v
…m CI macos-15 artifact)

Co-authored-by: Benjamin Dupin <bnjdpn@users.noreply.github.com>

bnjdpn commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

@minchenlee I updated the classic visual baselines in 9bf6a1a using the classic-visual-report artifact from the CI macos-15 run (no locally rendered PNGs). The workflows for this commit are waiting for maintainer approval (action_required). Could you approve the run when you have a moment? Thanks!

minchenlee and others added 3 commits November 18, 2026 09:42
…URL to cover

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FXb4ofqTMSGwAYLtBKW82v
…control

Taken from the classic-visual-report artifact of CI run 44220222671
(macos-15). No locally rendered images.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FXb4ofqTMSGwAYLtBKW82v
@minchenlee
minchenlee merged commit 6b28600 into minchenlee:main Nov 18, 2026
5 checks passed
minchenlee added a commit to bnjdpn/c9watch that referenced this pull request Nov 18, 2026
Keeps both the sort tests from minchenlee#247 and the card option tests.
Screenshot conflicts take this branch's images; CI-made baselines follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FXb4ofqTMSGwAYLtBKW82v
minchenlee added a commit to bnjdpn/c9watch that referenced this pull request Nov 18, 2026
…nto the card options

Taken from the classic-visual-report artifact of CI run 44225340450
(macos-15). Settings About no longer shows the Glass switch (minchenlee#249).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FXb4ofqTMSGwAYLtBKW82v
minchenlee added a commit that referenced this pull request Nov 18, 2026
…248)

* feat: show model and reasoning effort in Monitor

* feat: customize Monitor cards and show active turn duration

* feat: track working duration across Monitor providers

* test(visual): update classic baselines for Monitor card options (from CI macos-15 artifact)

Co-authored-by: Benjamin Dupin <bnjdpn@users.noreply.github.com>

* test(visual): update classic baselines after merging #247 into the card options

Taken from the classic-visual-report artifact of CI run 44225340450
(macos-15). Settings About no longer shows the Glass switch (#249).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FXb4ofqTMSGwAYLtBKW82v

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Benjamin Dupin <bnjdpn@users.noreply.github.com>
Co-authored-by: minchenlee <110967458+minchenlee@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

3 participants