Skip to content

fix(frontend): stop the session list claiming you have no sessions - #6430

Merged
ashrafchowdury merged 1 commit into
fix/session-row-narrowfrom
fix/session-list-stale-results
Sep 1, 2026
Merged

fix(frontend): stop the session list claiming you have no sessions#6430
ashrafchowdury merged 1 commit into
fix/session-row-narrowfrom
fix/session-list-stale-results

Conversation

@ardaerzin

Copy link
Copy Markdown
Contributor

Stacked on #6429. Base is fix/session-row-narrow, so this diff shows only its own two files.

Context

The session list could render "No sessions yet. Start a conversation…" to someone with 43 sessions.

placeholderData: keepPreviousData keeps the old rows on screen while a new query key resolves. That is right for a pin toggle, where the rows are the same and only their grouping is being rechecked. It is wrong for a search, where the rows genuinely do not match what was typed. The view could not tell the two apart, so it presented one query's results as the answer to another — and when the previous result happened to be empty, it stated as fact that the account had no sessions.

Typing in the search box mints a query per keystroke, so this was reachable by normal use.

Changes

useSessionsList now exposes isPlaceholder (from isPlaceholderData on either query), and the view uses it for two things:

  • The empty state renders only when the current query has actually answered. "No sessions yet" is a claim about the account and must never be made about an unsettled query.
  • While rows belong to a previous query, they dim and the container carries aria-busy. Dimmed rather than replaced with a skeleton: the rows are still real, they are just not the answer yet, and swapping them out is exactly the flash keepPreviousData exists to avoid.

Tests

tsc --noEmit and eslint clean.

Not exercised in a browser. The reasoning is from the query state, so it is worth confirming by hand.

What to QA

  • With plenty of sessions, type quickly in the search box. The list dims between keystrokes and never shows "No sessions yet" mid-typing.
  • Search for something with no matches. The empty state appears once the query settles, and reads as a filtered empty state with a clear-filters action rather than "no sessions yet".
  • Toggle a pin while filtered. The rows hold rather than flashing.

The list keeps a previous query's rows on screen while a new key resolves
(placeholderData: keepPreviousData), which is right for a pin toggle and stops
the skeleton flashing. The view could not tell those rows from a settled answer,
so it rendered the empty state over an unsettled query: on a project with 43
sessions the page said 'No sessions yet. Start a conversation with an agent and
it will show up here.', with no error and no spinner anywhere on screen. That
reads as data loss.

useSessionsList now reports isPlaceholder. The empty state waits for a settled
query, and the rows dim while they are a previous query's.

Scope, honestly: the empty state was observed while the list query was stalled by
connection exhaustion (F4 in the QA notes), and I have not reproduced that
scenario against this change, so treat the guard as principled rather than
verified. It is correct on its own terms — 'you have no sessions' is a claim
about the account and must not be made about an unsettled query.
@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
agenta-documentation Ready Ready Preview Sep 1, 2026 8:39am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • release/.*

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Team

Run ID: ed0e045c-f00a-42c4-af23-80c152e0309e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@ashrafchowdury
ashrafchowdury merged commit 64e1505 into fix/session-row-narrow Sep 1, 2026
52 of 53 checks passed
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.

2 participants