Skip to content

feat: sort WaitingForChoice sessions to the top in web UI and TUI#51

Draft
shadaj wants to merge 1 commit into
sandbox-a179c018-4d8a-40c0-9a3d-9bd0926bdefffrom
sandbox-d9022bfb-d303-4377-bf02-b56fecd72e86
Draft

feat: sort WaitingForChoice sessions to the top in web UI and TUI#51
shadaj wants to merge 1 commit into
sandbox-a179c018-4d8a-40c0-9a3d-9bd0926bdefffrom
sandbox-d9022bfb-d303-4377-bf02-b56fecd72e86

Conversation

@shadaj

@shadaj shadaj commented Jul 2, 2026

Copy link
Copy Markdown
Member
  • Updated SessionSidebar.tsx sort to prioritize sessions with
    status === "WaitingForChoice" above all others, with secondary
    sort by last_updated.
  • Added a pulsing CSS animation on the orange status dot for
    WaitingForChoice sessions to draw attention.
  • Updated both session-sort sites in terminal.rs (live update and
    /load command) to place WaitingForChoice sessions first.

Co-authored-by: Infinity 🤖 infinity@hydro.run

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 2, 2026

Copy link
Copy Markdown

Deploying infinity with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8962400
Status: ✅  Deploy successful!
Preview URL: https://65db1adc.infinity-dc7.pages.dev
Branch Preview URL: https://sandbox-d9022bfb-d303-4377-b.infinity-dc7.pages.dev

View logs

shadaj added a commit that referenced this pull request Jul 2, 2026
* Updated `SessionSidebar.tsx` sort to prioritize sessions with
  `status === "WaitingForChoice"` above all others, with secondary
  sort by `last_updated`.
* Added a pulsing CSS animation on the orange status dot for
  `WaitingForChoice` sessions to draw attention.
* Updated both session-sort sites in `terminal.rs` (live update and
  `/load` command) to place `WaitingForChoice` sessions first.


Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #51
@shadaj
shadaj force-pushed the sandbox-d9022bfb-d303-4377-bf02-b56fecd72e86 branch from c5dbd0c to 449ea3c Compare July 2, 2026 22:42
shadaj added a commit that referenced this pull request Jul 9, 2026
* Updated `SessionSidebar.tsx` sort to prioritize sessions with
  `status === "WaitingForChoice"` above all others, with secondary
  sort by `last_updated`.
* Added a pulsing CSS animation on the orange status dot for
  `WaitingForChoice` sessions to draw attention.
* Updated both session-sort sites in `terminal.rs` (live update and
  `/load` command) to place `WaitingForChoice` sessions first.


Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #51
@shadaj
shadaj force-pushed the sandbox-d9022bfb-d303-4377-bf02-b56fecd72e86 branch from 449ea3c to 7b33aa7 Compare July 9, 2026 20:55
shadaj added a commit that referenced this pull request Jul 9, 2026
* Updated `SessionSidebar.tsx` sort to prioritize sessions with
  `status === "WaitingForChoice"` above all others, with secondary
  sort by `last_updated`.
* Added a pulsing CSS animation on the orange status dot for
  WaitingForChoice sessions, disabled under `prefers-reduced-motion`
  for stable Playwright screenshots.
* Updated both session-sort sites in `terminal.rs` (live update and
  `/load` command) to place WaitingForChoice sessions first.

Tests:

* TUI snapshot test `waiting_for_choice_sorts_to_top` — verifies the
  session picker lists WaitingForChoice sessions above Running/Idle
  regardless of timestamp.
* Web e2e test `waiting_for_choice_status_in_sidebar` — spins up a
  mini RAP tool server that sends a `user_choice` callback, putting
  the session into WaitingForChoice state, then asserts the orange
  status dot with `data-status="WaitingForChoice"` is visible and
  screenshots the result.


Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #51
@shadaj
shadaj force-pushed the sandbox-d9022bfb-d303-4377-bf02-b56fecd72e86 branch from 7b33aa7 to a4465a5 Compare July 9, 2026 21:31
shadaj added a commit that referenced this pull request Jul 10, 2026
…h e2e tests

## Sorting

* `infinity-ui/src/components/SessionSidebar.tsx` — sessions with
  `status === "WaitingForChoice"` now sort above all others in the
  sidebar, with secondary sort by `last_updated`.
* `crates/infinity-agent-cli/src/terminal.rs` — both session-sort
  sites (live update and `/load` command) place WaitingForChoice
  sessions first.

## Visual highlighting

* `infinity-ui/src/components/SessionSidebar.module.css` — added a
  pulsing CSS animation on the orange status dot for WaitingForChoice,
  disabled under `prefers-reduced-motion: reduce` for stable
  Playwright screenshots.

## Shared test infrastructure

* `crates/rap-test-servers/src/lib.rs` — added `start_choice_server()`
  which exposes an `ask_permission` tool that responds with a
  `user_choice` callback, putting the session into WaitingForChoice
  state.

## Tests

* TUI snapshot test `waiting_for_choice_sorts_to_top` — verifies the
  session picker lists WaitingForChoice sessions above Running/Idle
  regardless of timestamp.
* Web e2e test `waiting_for_choice_status_in_sidebar` — uses the
  shared choice server to put a real session into WaitingForChoice,
  then asserts the orange `data-status="WaitingForChoice"` dot is
  visible and screenshots the sidebar.


Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #51
@shadaj
shadaj force-pushed the sandbox-d9022bfb-d303-4377-bf02-b56fecd72e86 branch from a4465a5 to b78f4d1 Compare July 10, 2026 21:38
@shadaj
shadaj changed the base branch from main to sandbox-a179c018-4d8a-40c0-9a3d-9bd0926bdeff July 10, 2026 21:38
shadaj added a commit that referenced this pull request Jul 10, 2026
…h e2e tests

## Sorting

* `infinity-ui/src/components/SessionSidebar.tsx` — sessions with
  `status === "WaitingForChoice"` now sort above all others in the
  sidebar, with secondary sort by `last_updated`.
* `crates/infinity-agent-cli/src/terminal.rs` — both session-sort
  sites (live update and `/load` command) place WaitingForChoice
  sessions first.

## Visual highlighting

* `infinity-ui/src/components/SessionSidebar.module.css` — added a
  pulsing CSS animation on the orange status dot for WaitingForChoice,
  disabled under `prefers-reduced-motion: reduce` for stable
  Playwright screenshots.

## Shared test infrastructure

* `crates/rap-test-servers/src/lib.rs` — added `start_choice_server()`
  which exposes an `ask_permission` tool that responds with a
  `user_choice` callback, putting the session into WaitingForChoice.

## Tests

* TUI snapshot test `waiting_for_choice_sorts_to_top` — verifies the
  session picker lists WaitingForChoice sessions above Running/Idle
  regardless of timestamp.
* Web e2e test `waiting_for_choice_status_in_sidebar` — creates two
  sessions, puts the first into WaitingForChoice via the shared choice
  server, switches focus to the second session, then asserts the
  orange `data-status="WaitingForChoice"` dot is visible on the
  inactive waiting session (sorted to top) and screenshots the result.


Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #51
@shadaj
shadaj force-pushed the sandbox-d9022bfb-d303-4377-bf02-b56fecd72e86 branch from b78f4d1 to be43971 Compare July 10, 2026 21:43
shadaj added a commit that referenced this pull request Jul 10, 2026
## Sorting

* `infinity-ui/src/components/SessionSidebar.tsx` — sessions with
  `status === "WaitingForChoice"` sort above all others, secondary
  sort by `last_updated`.
* `crates/infinity-agent-cli/src/terminal.rs` — both session-sort
  sites place WaitingForChoice sessions first.

## Visual highlighting

* `SessionSidebar.tsx` — `.item` now carries `data-status={info.status}`
  so CSS can target specific states.
* `SessionSidebar.module.css` — WaitingForChoice items get a 3px orange
  left border and a subtle warm background tint (the dot stays yellow,
  same as Idle). No animation needed.

## Shared test infrastructure

* `crates/rap-test-servers/src/lib.rs` — added `start_choice_server()`
  exposing an `ask_permission` tool that responds with a `user_choice`
  callback, putting the session into WaitingForChoice.

## Tests

* TUI snapshot `waiting_for_choice_sorts_to_top` — verifies the picker
  lists WaitingForChoice above Running/Idle regardless of timestamp.
* Web e2e `waiting_for_choice_status_in_sidebar` — creates two
  sessions, puts the first into WaitingForChoice, switches to the
  second, then asserts the highlighted item
  (`[data-status='WaitingForChoice']`) is visible and sorted to the
  top.


Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #51
@shadaj
shadaj force-pushed the sandbox-d9022bfb-d303-4377-bf02-b56fecd72e86 branch from be43971 to 83f73c2 Compare July 10, 2026 21:49
shadaj added a commit that referenced this pull request Jul 10, 2026
## Sorting

* `infinity-ui/src/components/SessionSidebar.tsx` — sessions with
  `status === "WaitingForChoice"` sort above all others, secondary
  sort by `last_updated`.
* `crates/infinity-agent-cli/src/terminal.rs` — both session-sort
  sites place WaitingForChoice sessions first.

## Visual highlighting

* `SessionSidebar.tsx` — `.item` now carries `data-status={info.status}`
  so CSS can target specific states.
* `SessionSidebar.module.css` — WaitingForChoice items get a 3px orange
  left border and a subtle warm background tint; the dot stays yellow
  (same as Idle). Item padding reduced from 10px to 8px vertical with
  4px margin-bottom for spacing between items.

## Shared test infrastructure

* `crates/rap-test-servers/src/lib.rs` — added `start_choice_server()`
  exposing an `ask_permission` tool that responds with a `user_choice`
  callback, putting the session into WaitingForChoice.

## Tests

* TUI snapshot `waiting_for_choice_sorts_to_top` — verifies the picker
  lists WaitingForChoice above Running/Idle regardless of timestamp.
* Web e2e `waiting_for_choice_status_in_sidebar` — creates two
  sessions, puts the first into WaitingForChoice, switches to the
  second, then asserts the highlighted item is visible and sorted to
  the top.


Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #51
@shadaj
shadaj force-pushed the sandbox-d9022bfb-d303-4377-bf02-b56fecd72e86 branch 2 times, most recently from a7f7a45 to bd11d2d Compare July 13, 2026 17:59
@shadaj
shadaj force-pushed the sandbox-a179c018-4d8a-40c0-9a3d-9bd0926bdeff branch from 342160f to 28bda4e Compare July 13, 2026 17:59
shadaj added a commit that referenced this pull request Jul 16, 2026
## Sorting

* `infinity-ui/src/components/SessionSidebar.tsx` — sessions with
  `status === "WaitingForChoice"` sort above all others, secondary
  sort by `last_updated`.
* `crates/infinity-agent-cli/src/terminal.rs` — both session-sort
  sites place WaitingForChoice sessions first.

## Visual highlighting

* `SessionSidebar.tsx` — `.item` now carries `data-status={info.status}`
  so CSS can target specific states.
* `SessionSidebar.module.css` — WaitingForChoice items get a 3px orange
  left border and a subtle warm background tint; the dot stays yellow
  (same as Idle). Item padding reduced from 10px to 8px vertical with
  4px margin-bottom for spacing between items.

## Shared test infrastructure

* `crates/rap-test-servers/src/lib.rs` — added `start_choice_server()`
  exposing an `ask_permission` tool that responds with a `user_choice`
  callback, putting the session into WaitingForChoice.

## Tests

* TUI snapshot `waiting_for_choice_sorts_to_top` — verifies the picker
  lists WaitingForChoice above Running/Idle regardless of timestamp.
* Web e2e `waiting_for_choice_status_in_sidebar` — creates two
  sessions, puts the first into WaitingForChoice, switches to the
  second, then asserts the highlighted item is visible and sorted to
  the top.


Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #51
@shadaj
shadaj force-pushed the sandbox-a179c018-4d8a-40c0-9a3d-9bd0926bdeff branch from 28bda4e to e50d8f3 Compare July 16, 2026 21:20
@shadaj
shadaj force-pushed the sandbox-d9022bfb-d303-4377-bf02-b56fecd72e86 branch from bd11d2d to c7f8889 Compare July 16, 2026 21:20
shadaj added a commit that referenced this pull request Jul 16, 2026
## Sorting

* `infinity-ui/src/components/SessionSidebar.tsx` — sessions with
  `status === "WaitingForChoice"` sort above all others, secondary
  sort by `last_updated`.
* `crates/infinity-agent-cli/src/terminal.rs` — both session-sort
  sites place WaitingForChoice sessions first.

## Visual highlighting

* `SessionSidebar.tsx` — `.item` now carries `data-status={info.status}`
  so CSS can target specific states.
* `SessionSidebar.module.css` — WaitingForChoice items get a 3px orange
  left border and a subtle warm background tint; the dot stays yellow
  (same as Idle). Item padding reduced from 10px to 8px vertical with
  4px margin-bottom for spacing between items.

## Shared test infrastructure

* `crates/rap-test-servers/src/lib.rs` — added `start_choice_server()`
  exposing an `ask_permission` tool that responds with a `user_choice`
  callback, putting the session into WaitingForChoice.

## Tests

* TUI snapshot `waiting_for_choice_sorts_to_top` — verifies the picker
  lists WaitingForChoice above Running/Idle regardless of timestamp.
* Web e2e `waiting_for_choice_status_in_sidebar` — creates two
  sessions, puts the first into WaitingForChoice, switches to the
  second, then asserts the highlighted item is visible and sorted to
  the top.


Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #51
@shadaj
shadaj force-pushed the sandbox-d9022bfb-d303-4377-bf02-b56fecd72e86 branch from c7f8889 to da521ce Compare July 16, 2026 21:49
@shadaj
shadaj force-pushed the sandbox-a179c018-4d8a-40c0-9a3d-9bd0926bdeff branch from e50d8f3 to c0bb9ff Compare July 16, 2026 21:49
shadaj added a commit that referenced this pull request Jul 16, 2026
## Sorting

* `infinity-ui/src/components/SessionSidebar.tsx` — sessions with
  `status === "WaitingForChoice"` sort above all others, secondary
  sort by `last_updated`.
* `crates/infinity-agent-cli/src/terminal.rs` — both session-sort
  sites place WaitingForChoice sessions first.

## Visual highlighting

* `SessionSidebar.tsx` — `.item` now carries `data-status={info.status}`
  so CSS can target specific states.
* `SessionSidebar.module.css` — WaitingForChoice items get a 3px orange
  left border and a subtle warm background tint; the dot stays yellow
  (same as Idle). Item padding reduced from 10px to 8px vertical with
  4px margin-bottom for spacing between items.

## Shared test infrastructure

* `crates/rap-test-servers/src/lib.rs` — added `start_choice_server()`
  exposing an `ask_permission` tool that responds with a `user_choice`
  callback, putting the session into WaitingForChoice.

## Tests

* TUI snapshot `waiting_for_choice_sorts_to_top` — verifies the picker
  lists WaitingForChoice above Running/Idle regardless of timestamp.
* Web e2e `waiting_for_choice_status_in_sidebar` — creates two
  sessions, puts the first into WaitingForChoice, switches to the
  second, then asserts the highlighted item is visible and sorted to
  the top.


Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #51
@shadaj
shadaj force-pushed the sandbox-d9022bfb-d303-4377-bf02-b56fecd72e86 branch from da521ce to a49c708 Compare July 16, 2026 22:37
@shadaj
shadaj force-pushed the sandbox-a179c018-4d8a-40c0-9a3d-9bd0926bdeff branch from c0bb9ff to 5627ee1 Compare July 16, 2026 22:37
## Sorting

* `infinity-ui/src/components/SessionSidebar.tsx` — sessions with
  `status === "WaitingForChoice"` sort above all others, secondary
  sort by `last_updated`.
* `crates/infinity-agent-cli/src/terminal.rs` — both session-sort
  sites place WaitingForChoice sessions first.

## Visual highlighting

* `SessionSidebar.tsx` — `.item` now carries `data-status={info.status}`
  so CSS can target specific states.
* `SessionSidebar.module.css` — WaitingForChoice items get a 3px orange
  left border and a subtle warm background tint; the dot stays yellow
  (same as Idle). Item padding reduced from 10px to 8px vertical with
  4px margin-bottom for spacing between items.

## Shared test infrastructure

* `crates/rap-test-servers/src/lib.rs` — added `start_choice_server()`
  exposing an `ask_permission` tool that responds with a `user_choice`
  callback, putting the session into WaitingForChoice.

## Tests

* TUI snapshot `waiting_for_choice_sorts_to_top` — verifies the picker
  lists WaitingForChoice above Running/Idle regardless of timestamp.
* Web e2e `waiting_for_choice_status_in_sidebar` — creates two
  sessions, puts the first into WaitingForChoice, switches to the
  second, then asserts the highlighted item is visible and sorted to
  the top.


Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #51
@shadaj
shadaj force-pushed the sandbox-a179c018-4d8a-40c0-9a3d-9bd0926bdeff branch from 5627ee1 to 96ce40e Compare July 16, 2026 22:55
@shadaj
shadaj force-pushed the sandbox-d9022bfb-d303-4377-bf02-b56fecd72e86 branch from a49c708 to 8962400 Compare July 16, 2026 22:55
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.

1 participant