GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(sessions-list): update live for new rooms and accepted enquiries (#1206) by nikunjdecyb · Pull Request #1320 · OpenResilienceInitiative/ORISO-Frontend

Conversation

@nikunjdecyb

@nikunjdecyb nikunjdecyb commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

Closes #1206

Root cause — two independent breaks (both verified in code, not assumed)

1. A message from a room the list has never loaded was silently dropped. onNewMessageEvent (SessionsList) hands the roomId to touchSessionsByRids, which maps each rid onto an existing session and return null when there is none; the follow-up handleRIDs call is likewise gated on touchesLoadedSession. So for a brand-new enquiry the emitter fires, nothing matches, both branches no-op — the list never learns the room exists. That is exactly "I must hard refresh to see a new user".

2. anonymousEnquiryAccepted raised a toast and nothing else. Its siblings (newAnonymousEnquiry, anonymousConversationFinished) set a state flag whose effect emits the refresh flags; this branch did not. The accepted entry therefore stayed in every counsellor's request list and never reached the assignee's conversation list — the request→chat transition needed a reload.

Not the cause, and checked: the 15 s poll only runs while the Live-Chat chip is selected (sessionToolbarChip !== 'liveChat' returns early), so it never covered the general case.

The fix

Both decisions live in pure modules, so the behaviour is tested without mounting the 900-line list component:

  • sessionsList/liveListRefresh.ts — isRoomInSessions (does this list already hold the room?) and createRefreshThrottle (one refetch per burst). SessionsList now refetches the tab's list when the room is unknown instead of touching nothing.
  • app/stompListRefresh.ts — resolveStompListRefresh(eventType) maps the membership-changing live events to their refresh flags, case-insensitively (the backend sends both camelCase and ALL-CAPS, which the old switch duplicated by hand). WebsocketHandler follows its own sibling pattern for anonymousEnquiryAccepted: state flag → effect that emits both flags and keeps the toast.

the two changes and the tests

Test evidence

  • TDD: both suites failed first with Cannot find module, then pass — 11 new tests.
  • npx vitest run --project unit src/components/sessionsList src/components/app/stompListRefresh.test.ts → 20 files / 125 tests
  • npm run lint:scripts (eslint + tsc) → pass
  • npm run test:unit → 374 files, 4055 tests pass

On AC3 (E2E) — stated plainly

The issue asks for an E2E regression test. This repo deliberately keeps Cypress and the Playwright smoke out of CI because the app's bootstrap needs a reachable backend (the note in .github/workflows/ci-pull-request.yml says so). Adding an E2E that CI cannot run would be dead weight, so the logic is pinned by the unit tests above and the two-browser scenario stays in the reviewer test plan below. Happy to add one if the team wants it wired to a backend-backed job.

Reviewer test plan (from the issue)

  • Two browsers: asker sends first enquiry → counsellor's request list gains the entry without reload
  • Counsellor accepts → both sides move to the chat view without reload
  • Leave the counsellor idle 10 minutes, then repeat → still updates (no dead subscription)

Scope

  • The raw [[align:left]]… preview tokens visible in the same capture belong to Encryption on dev: DecryptionError from missing key backup; raw FIRST_RESPONSE list preview #1191 / Conversation list shows raw Erstantwort JSON instead of readable preview text #1117; the issue says not to fix them here, and this PR does not.
  • The asker-side slice (Enquiry does not update to a conversation automatically for the advice seeker #1199) shares this root cause — the unknown-room refetch is role-agnostic and applies to the asker list too.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
nikunjdecyb and others added 2 commits September 6, 2026 15:10
@nikunjdecyb @claude
fix(sessions-list): update live for new rooms and accepted enquiries (O…
9589f9a
…penResilienceInitiative#1206)

Two independent breaks made a hard reload the only way to see a new user
or a request that became a chat.

1. A message from a room the list has never loaded was dropped.
   onNewMessageEvent hands the roomId to touchSessionsByRids, which maps
   each rid onto an *existing* session and returns null when there is
   none, and the follow-up handleRIDs call is likewise guarded by
   "touchesLoadedSession". So for a brand-new enquiry both branches
   no-op and the list never learns the room exists. It now refetches the
   tab's list when the room is unknown, throttled so a burst from the
   same new room causes one refetch.

2. anonymousEnquiryAccepted raised a toast and nothing else, while its
   siblings (newAnonymousEnquiry, anonymousConversationFinished) set a
   state flag whose effect emits the refresh flags. The accepted entry
   therefore stayed in every counsellor's request list and never reached
   the assignee's conversation list. It now follows the same pattern and
   emits both flags, keeping the toast.

Both decisions live in pure modules so they are tested without mounting
the 900-line list: sessionsList/liveListRefresh.ts (isRoomInSessions,
createRefreshThrottle) and app/stompListRefresh.ts
(resolveStompListRefresh, case-insensitive because the backend sends both
camelCase and ALL-CAPS). 11 tests, all failing first.

AC3 asks for an E2E: this repo keeps Cypress and the Playwright smoke out
of CI because the bootstrap needs a reachable backend, so the two-browser
scenario stays in the reviewer test plan rather than as a test CI cannot
run.

Refs OpenResilienceInitiative#1206

Co-Authored-By: Claude Opus 5 <[email protected]>
@nikunjdecyb @claude
docs(agent-tasks): OpenResilienceInitiative#1206 proof screenshot
18bb571
Co-Authored-By: Claude Opus 5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 6, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 16 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

This review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: c0f7dc80-7819-437a-8143-23b169e29b6a

📥 Commits

Reviewing files that changed from the base of the PR and between 1390d92 and ca02b85.

⛔ Files ignored due to path filters (3)
  • .gitignore is excluded by none and included by none
  • docs/agent-tasks/2026-09-06_issue-1206-live-session-list/screenshots/01-code-change-and-tests.png is excluded by !**/*.png and included by none
  • docs/agent-tasks/2026-09-06_issue-1206-live-session-list/screenshots/issue-annotated-report.png is excluded by !**/*.png and included by none
📒 Files selected for processing (10)
  • docs/agent-tasks/2026-09-06_issue-1206-live-session-list/00-problem-brief.md
  • docs/agent-tasks/2026-09-06_issue-1206-live-session-list/01-spike.md
  • docs/agent-tasks/2026-09-06_issue-1206-live-session-list/03-progress-log.md
  • docs/agent-tasks/2026-09-06_issue-1206-live-session-list/04-test-evidence.md
  • src/components/app/WebsocketHandler.tsx
  • src/components/app/stompListRefresh.test.ts
  • src/components/app/stompListRefresh.ts
  • src/components/sessionsList/SessionsList.tsx
  • src/components/sessionsList/liveListRefresh.test.ts
  • src/components/sessionsList/liveListRefresh.ts

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nikunjdecyb
nikunjdecyb requested review from Shirloin, Storypapst and shazia-k September 6, 2026 09:43
@nikunjdecyb nikunjdecyb mentioned this pull request Sep 6, 2026
Session lists need a hard refresh to show new users and chats — live updates missing #1206
Closed
2 of 8 tasks
Shazia Kausar @claude
Merge origin/dev into claude/1206/live-session-list-updates
ca02b85
Resolves the .gitignore conflict: both sides appended docs/agent-tasks
un-ignore pairs to the same block. Union kept, so dev's entries and this
branch's issue-1206 entry all survive.

Co-Authored-By: Claude Opus 5 <[email protected]>
shanzaeimran
shanzaeimran approved these changes Sep 8, 2026
View reviewed changes
@shazia-k
shazia-k merged commit a0a0485 into OpenResilienceInitiative:dev Sep 8, 2026
6 checks passed

Uh oh!

There was an error while loading. Please reload this page.

shazia-k pushed a commit to nikunjdecyb/ORISO-Frontend that referenced this pull request Sep 8, 2026
Shazia Kausar @claude
Merge origin/dev into claude/1207/public-contact-link-analysis
f28213b
Resolves the .gitignore conflict again after OpenResilienceInitiative#1320 and OpenResilienceInitiative#1340 merged to
dev. Both sides append docs/agent-tasks un-ignore pairs to the same
block; union kept so dev's issue-1206 entry and this branch's issue-1207
entry both survive.

Co-Authored-By: Claude Opus 5 <[email protected]>
@Storypapst Storypapst mentioned this pull request Sep 16, 2026
feat(notifications): refetch session lists from new feed events #1446
Merged
3 tasks
This was referenced Sep 30, 2026
Prepare protected feedback email intent and neutral seven-language copy #1594
Closed
Notification mails (new/direct enquiry, assignment, daily digest, handover, free text) in the ORISO design #869
Closed
Storybook: case-handover and feedback mails #864
Closed
EPIC: transactional e-mails — one design system across every sending path #828
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@shanzaeimran shanzaeimran shanzaeimran approved these changes
@Shirloin Shirloin Awaiting requested review from Shirloin
@Storypapst Storypapst Awaiting requested review from Storypapst
@shazia-k shazia-k Awaiting requested review from shazia-k

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@nikunjdecyb @shanzaeimran @shazia-k
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.