Skip to content

bug(webui): archived session "flashes back" due to SSE race condition #7882

@hotic

Description

@hotic

Problem

When archiving a session in WebUI sidebar, the session briefly disappears then reappears (~100ms later).

Possible Cause

The session.archive API may trigger a session.updated SSE event before archive completes. The optimistic update removes the session, but then the stale event re-adds it.

Suggestion

Use the same logic as TUI - call session.delete API instead, which sends a session.deleted event and avoids confusion with update events.

Video

2026-01-12_06.31.23.mp4

Metadata

Metadata

Assignees

Labels

webRelates to opencode on web / desktop

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions