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 — Submitted prompt is stored twice in the app message store (fork dialog duplicates, undo leaves a ghost) · Issue #41428 · anomalyco/opencode

Submitted prompt is stored twice in the app message store (fork dialog duplicates, undo leaves a ghost) #41428

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
Submitted prompt is stored twice in the app message store (fork dialog duplicates, undo leaves a ghost)#41428
Copy link
Assignees
Brendonovich

Description

@leepokai
leepokai
opened on Aug 9, 2026
Issue body actions

Description

Since #41001 (9113255) the web/desktop app keeps two copies of every submitted prompt in the client message store.

The prompt input adds an optimistic user message stamped with the client's Date.now() and sends the same message id to the server, which persists it with its own timestamp when the prompt lands — so the server copy's time.created is always a bit later. The message.updated handler now resolves rows by messageKey (time.created + id) instead of id, misses the optimistic row because the key differs, and splices the server copy in next to it: same id, two rows.

Knock-on effects until a full session refetch: the fork dialog reads this store without deduping, so the prompt is listed twice; message.removed deletes only the first same-id row, so removing the message leaves a ghost copy; mergeOptimisticPage never confirms the optimistic item because its exact-key search misses too. Same pattern in server-session.ts (message.updated handler and mergeOptimisticPage), sync.tsx, and global-sync/event-reducer.ts.

Steps to reproduce

  1. In the web app, submit a prompt in any session
  2. The session's message store now holds two rows with the same message id and different time.created — the fork dialog lists the prompt twice
  3. Unit-level repro: sync a createServerSession store containing a message at time.created: 1, then apply message.updated with the same id at time.created: 2 — the store ends up with 2 rows instead of replacing the one

OpenCode version

dev @ 0bff28d

Operating System

reproduced at the store level (unit test), platform-independent

Activity

  1. github-actions
    assigned
    Brendonovich
    on Aug 9, 2026
  2. github-actions commented on Oct 10, 2026

    @github-actions
    github-actionsBot
    on Oct 10, 2026 – with GitHub Actions
    Contributor
    More actions

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  3. github-actions
    closed this as not plannedon Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @Brendonovich
    Brendonovich

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    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.