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 — perf(app): open sessions without downloading read-tool images by kitlangton · Pull Request #58586 · anomalyco/opencode

Conversation

@kitlangton

@kitlangton kitlangton commented Oct 24, 2026 •
edited by opencode-agent Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Opening a session where the agent read images no longer downloads those images.
The desktop and web read card loads its image from disk by path, never from the bytes in the message list, but the message list still sent every image's base64. The app now loads its timeline from a new experimental route that leaves those bytes out. Pasted images and images from other tools are not affected, and the stable message route is unchanged.

🔍 Origin: related to #50505 and #36444. Step 1 of a plan for timeline images; it complements #58427 and #58560, which drop the same bytes after download.

❌ Before

  1. The app asks for a page of messages.
  2. The server includes every read-tool image as base64.
  3. The app downloads it all, then ignores those bytes.

✅ After

  1. The app asks GET /api/experimental/session/:sessionID/timeline, with the same params and response shape as the message list.
  2. On that route only, data: files are removed from finished read results; an image-only result gets the usual "Image read successfully" text. Execute and MCP images stay.
  3. Single-message reads, Revert, Fork, exports and model context keep the stable route.
- app -> GET /session/:id/message          // read images inline
+ app -> GET /experimental/session/:id/timeline  // same handler, read-tool data: files dropped

📊 Numbers: opening an image-heavy session (11 image reads, 2 pasted images), production app build in headless Chromium against the real server, with a proxy modelling the link. Medians of 7 runs.

Link First page Newest message painted Scroll settled
50 ms / 50 Mbit before 5.91 MB 1336 ms 1426 ms
50 ms / 50 Mbit after 1.85 MB 685 ms 721 ms
localhost, cold server before 5.91 MB 789 ms 789 ms
localhost, cold server after 1.85 MB 645 ms 760 ms

At 50 Mbit the runs don't overlap (1274–1439 ms before, 567–762 ms after). Most of the remaining 1.85 MB is the two pasted images, left alone here. The read card still loads full size from disk. New tests cover dropped read media, kept execute media and identical paging.

↩️ Undo: a plain revert is enough; nothing stored changes.

👀 Read: core/src/session/store.ts, where read results are stripped for this route only. A client that rendered read images from message content would lose them, but none do. The rest is routine, plus a generated client and OpenAPI update.

Public API: adds experimental client.experimental.session.timeline, backwards compatible · measured in headless Chromium on a Mac

Checks run

After rebase onto current dev:

  • bun test test/message.test.ts test/media.test.ts (server): 5 pass; bun typecheck (server): no errors
  • bun test test/session-store.test.ts (core): 2 pass
  • bun test src/runtime/server/request-queue.test.ts (app): 13 pass

Before rebase: client 40, server 19, app 49, timeline store 36, read-image component 7 pass; tsc -b clean; OpenAPI check clean.


Added by the opencode bot (AI-generated).

Related: #50505, #36444

Public API: adds experimental GET /api/experimental/session/:sessionID/timeline (client.experimental.session.timeline); backwards compatible

Sorry, something went wrong.

Uh oh!

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

All reactions
@kitlangton
kitlangton requested review from Brendonovich and Hona as code owners October 24, 2026 02:43
@github-actions github-actions Bot added the contributor label Oct 24, 2026
opencode-agent[bot]
opencode-agent Bot reviewed Oct 24, 2026
View reviewed changes

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd approve this. I ran the new server test, which goes through the real HTTP route and the generated client, plus the nearby client tests (promise.test.ts, solid-data.test.ts). I also ran tsc -b in core, server, protocol, client and app, and the OpenAPI --check in www. All pass and are clean. I didn't run the desktop/web app in a browser, so I haven't measured the payload and timing numbers myself.

In the code, only the timeline store's two page loads use the swapped message.list. Export and Fork call serverSDK.api directly, and the read card loads its image by data-local-image path, so nothing it shows depends on the dropped bytes. PDFs read by the tool also lose their inline bytes on this route, but the read card never showed them anyway.

Public API: one addition, GET /api/experimental/session/:sessionID/timeline (experimental.session.timeline; SDK client.experimental.session.timeline and the matching Effect client type). It takes the same query and returns the same SessionMessagesResponse as the message list. The stable message list route, its OpenAPI entry and client.message are unchanged. Backwards compatible: existing callers are unaffected.

No blocking concerns.

Related: #50505, #36444

Sorry, something went wrong.

Uh oh!

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

All reactions
opencode-agent[bot]
opencode-agent Bot reviewed Oct 24, 2026
View reviewed changes

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new commit only changes e2e test helpers: the mock server answers the experimental timeline route with the same pagination code as its message list, and the e2e specs and benchmarks that watched the old path for timeline loads now watch the new one. No timeline checks against the old path are left. I ran the mock-server unit test (3 pass) and tsc -b in packages/app (clean). tsc on the e2e project reports 9 errors, the same count as at the previous head, so none are new. I didn't run the Playwright specs themselves.

This commit doesn't change the public API. The PR still adds only the experimental GET /api/experimental/session/:sessionID/timeline route (client.experimental.session.timeline), and stays backwards compatible.

No new concerns.

Sorry, something went wrong.

Uh oh!

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

All reactions
opencode-agent[bot]
opencode-agent Bot reviewed Oct 24, 2026
View reviewed changes

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new commit only adds // SAFETY: comments and one blank line to three e2e specs, so behaviour doesn't change. Nothing new to raise. The public API is unchanged by this commit. The PR as a whole still only adds the experimental GET /api/experimental/session/:sessionID/timeline route (client.experimental.session.timeline), and stays backwards compatible.

Sorry, something went wrong.

Uh oh!

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

All reactions
@kitlangton
kitlangton force-pushed the timeline-read-images branch from 398b2fb to 3a634cf Compare October 24, 2026 03:26
opencode-agent[bot]
opencode-agent Bot reviewed Oct 24, 2026
View reviewed changes

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This push only rebases onto the latest dev. Compared with the previous version, the one difference is that the services/www OpenAPI spec copies are gone, since the base no longer commits them (#58593). The rest of the change is identical. On the new head, the server message tests pass, tsc -b in protocol is clean, and the www OpenAPI --check exits cleanly.

The public API is the same as before: one addition, the experimental GET /api/experimental/session/:sessionID/timeline route (client.experimental.session.timeline). It's backwards compatible.

No new concerns.

Sorry, something went wrong.

Uh oh!

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

All reactions
@github-actions github-actions Bot mentioned this pull request Oct 24, 2026
📊 AI CLI 工具社区动态日报 2026-10-24 96loveslife/big_model_radar#698
Open
@opencode-agent opencode-agent Bot mentioned this pull request Oct 24, 2026
app: session message pages carry tool-result images the web timeline never draws #58761
Closed
@lsequeiraa lsequeiraa mentioned this pull request Oct 25, 2026
fix(app): read local images with the session location #58804
Closed
3 of 6 tasks
@kitlangton
kitlangton force-pushed the timeline-read-images branch from 3a634cf to e99985e Compare October 26, 2026 07:24
opencode-agent[bot]
opencode-agent Bot reviewed Oct 26, 2026
View reviewed changes

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rebase carries the change over correctly. The read-image filtering now runs on stored rows before blob hydration and also drops media: references, so the timeline never reads image blobs it throws away. Both kinds of client get the same filtering, and media.test.ts covers this. On the new head, the server message and media tests (5) and the client promise tests (40) pass, and tsc -b is clean in core, server, protocol, client and app. I didn't run the Playwright e2e specs (no browsers installed here).

Public API: unchanged from the previous review: one addition, experimental GET /api/experimental/session/:sessionID/timeline (client.experimental.session.timeline), which also honours X-OpenCode-Capabilities: experimental-media-uri. Backwards compatible.

One e2e test will break: "loads a tab's transcript while the pointer rests on it, and not when it passes over" in packages/app/e2e/regression/tabs.spec.ts (around line 1280, from #57131) still matches /api/session/:id/message. Hovering a tab calls ctx.data.session.message.sync, which with this PR requests /api/experimental/session/:id/timeline, so requested never gets b.id and the poll at line 1310 will time out. Changing that regex to the timeline path, as the other specs here already do, should fix it.

Sorry, something went wrong.

Uh oh!

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

All reactions
@kitlangton
kitlangton force-pushed the timeline-read-images branch from e99985e to ff52741 Compare October 26, 2026 07:54
opencode-agent[bot]
opencode-agent Bot reviewed Oct 26, 2026
View reviewed changes

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This push fixes the hover-prefetch e2e test in tabs.spec.ts that I flagged last time. It also gives the first timeline page the same head start in the app's request queue as the first message page, so opening a session isn't slowed by queued background reads. The timeline now drops only image attachments, so PDF reads keep their content.

I ran the request-queue, server message and media, and client promise tests: all pass. tsc -b is clean in core, server and app. I didn't run the Playwright e2e specs.

Public API: unchanged from the previous review: one addition, experimental GET /api/experimental/session/:sessionID/timeline (client.experimental.session.timeline). It's backwards compatible.

No new concerns.

Sorry, something went wrong.

Uh oh!

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

All reactions
@kitlangton
fix(core): serve the app timeline without read-tool image payloads
1ecdef5
@kitlangton
kitlangton force-pushed the timeline-read-images branch from ff52741 to 1ecdef5 Compare October 26, 2026 17:47
@kitlangton kitlangton changed the title fix(core): serve the app timeline without read-tool image payloads perf(app): open sessions without downloading read-tool images Oct 26, 2026
opencode-agent[bot]
opencode-agent Bot reviewed Oct 26, 2026
View reviewed changes

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This push only rebases onto newer dev; the commit itself is unchanged. On the rebased head the server message and media tests and the app request-queue tests pass, and tsc -b is clean in core, server and app.

Public API: unchanged from the previous review: one addition, experimental GET /api/experimental/session/:sessionID/timeline (client.experimental.session.timeline). It's backwards compatible.

No new concerns.

Sorry, something went wrong.

Uh oh!

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

All reactions
@lsequeiraa

lsequeiraa commented Oct 27, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Since #58804 was closed in favour of this: could the opted-in path (wantsMediaRefs → messagesWithRefs) keep read images as their media: refs, and drop them only on the default path as now?

On the default path a kept ref would be hydrated back into the bytes, but for a client that sent experimental-media-uri it's under 100 bytes. It would let the read card show the stored image through /api/experimental/media/:hash, which names no location.

Today the card reads the file from disk with its parent folder as the location. That boots the folder with its MCP servers, and registers it as a project when it's outside any repository (#58762). Rendering from the ref shows what the model saw and keeps outside images previewable, with the disk read as the fallback for sessions without blobs.

All reactions

Sorry, something went wrong.

Uh oh!

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

@opencodejr opencodejr Bot mentioned this pull request Oct 29, 2026
[FEATURE(app)]: display image attachments from tool results in chat UI #21227
Closed
1 task done
@opencodejr opencodejr Bot mentioned this pull request Nov 15, 2026
Desktop app drops MCP image content blocks (Android renders them) #64012
Closed
@github-actions

github-actions Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions github-actions Bot closed this Nov 24, 2026
@github-actions github-actions Bot added the automated-pr-cleanup label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencode-agent opencode-agent[bot] opencode-agent[bot] left review comments
@Hona Hona Awaiting requested review from Hona
@Brendonovich Brendonovich Awaiting requested review from Brendonovich

Uh oh!

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

Assignees

No one assigned

Labels

automated-pr-cleanup contributor

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.

2 participants

@kitlangton @lsequeiraa
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.