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 OpenCode event session routing by samjandris · Pull Request #2634 · pingdotgg/t3code

Conversation

@samjandris

@samjandris samjandris commented May 11, 2026 •
edited by macroscopeapp Bot
Loading

Uh oh!

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

Copy link
Copy Markdown

Summary

  • switch OpenCode runtime events from the now-empty /event stream to /global/event
  • unwrap global event payloads for the active session directory before using the existing provider event projection
  • add regression coverage that the adapter uses the global event stream and handles wrapped OpenCode message events

Fixes #2633

Test plan

  • bun fmt
  • bun lint
  • bun typecheck
  • bun run --cwd apps/server test src/provider/Layers/OpenCodeAdapter.test.ts

Note

Medium Risk
Changes how OpenCode runtime events are consumed and filtered (switching to global.event and dropping non-matching directories), which could affect event delivery/completion semantics across sessions if the upstream event shape differs.

Overview
Routes OpenCode runtime event consumption from the per-session event.subscribe stream to client.global.event, and updates the adapter to unwrap payload and ignore events not matching the session directory before projecting provider runtime events.

Updates the event type aliasing to reflect the wrapped global-event shape, and extends the test double + adds a regression test that enforces use of global.event (throwing if event.subscribe is called) and validates content.delta emission from wrapped message events for the correct session directory.

Reviewed by Cursor Bugbot for commit f4137b5. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix OpenCode event session routing by filtering global events by directory

  • Switches the event subscription in OpenCodeAdapter.ts from client.event.subscribe to client.global.event, which emits events for all directories.
  • Adds directory-based filtering so only events whose directory matches the session's working directory are forwarded to the event handler.
  • Updates the OpenCodeSubscribedEvent type alias to extract the payload field from global events, resolving to never for events without a payload.
  • Test doubles in OpenCodeAdapter.test.ts are updated to simulate long-lived, abortable global event streams and assert directory-scoped filtering behavior.
  • Behavioral Change: event.subscribe is no longer used; the adapter now receives all directory events globally and filters client-side.

Macroscope summarized f4137b5.

Sorry, something went wrong.

Uh oh!

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

All reactions
@coderabbitai

coderabbitai Bot commented May 11, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. 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 UI

Review profile: CHILL

Plan: Pro

Run ID: 55b9fcd7-0c11-4402-8a03-ba38fa940586

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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
  • X
  • Mastodon
  • Reddit
  • LinkedIn

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels May 11, 2026
macroscopeapp[bot]
macroscopeapp Bot reviewed May 11, 2026
View reviewed changes
Comment thread apps/server/src/provider/Layers/OpenCodeAdapter.ts Resolved

Uh oh!

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

@macroscopeapp

macroscopeapp Bot commented May 11, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR changes runtime event routing by switching to a global event API and adding directory-based filtering. While focused and well-tested, the change affects which sessions receive which events, representing a meaningful runtime behavior change that warrants human review.

You can customize Macroscope's approvability policy. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

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

@samjandris
samjandris force-pushed the feature/feat/opencode-content-delta branch from 8905c26 to a4eb68f Compare May 11, 2026 00:56
@samjandris samjandris changed the title Fix OpenCode assistant streaming Fix OpenCode event session routing May 11, 2026
cursor[bot]
cursor Bot reviewed May 11, 2026
View reviewed changes

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a4eb68fadae2d34da3243a35ab10dee2725a08d5. Configure here.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread apps/server/src/provider/Layers/OpenCodeAdapter.ts Resolved

Uh oh!

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

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes May 11, 2026
View reviewed changes
@samjandris
samjandris force-pushed the feature/feat/opencode-content-delta branch from a4eb68f to fb98a2a Compare May 11, 2026 01:05
@macroscopeapp
macroscopeapp Bot dismissed their stale review May 11, 2026 01:06

Dismissing prior approval to re-evaluate fb98a2a

@github-actions github-actions Bot added size:S 10-29 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels May 11, 2026
@samjandris samjandris changed the title Fix OpenCode event session routing wip: Fix OpenCode event session routing May 11, 2026
@samjandris
samjandris marked this pull request as draft May 11, 2026 01:08
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes May 11, 2026
View reviewed changes
@samjandris
samjandris force-pushed the feature/feat/opencode-content-delta branch 2 times, most recently from d1e2892 to 45b5d2c Compare May 11, 2026 01:25
@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). and removed size:S 10-29 changed lines (additions + deletions). labels May 11, 2026
@samjandris
samjandris force-pushed the feature/feat/opencode-content-delta branch from 45b5d2c to 58774a5 Compare May 11, 2026 02:08
@github-actions github-actions Bot added size:S 10-29 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels May 11, 2026
@samjandris
samjandris force-pushed the feature/feat/opencode-content-delta branch from 58774a5 to fb8297c Compare May 11, 2026 03:32
@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). and removed size:S 10-29 changed lines (additions + deletions). labels May 11, 2026
@samjandris
samjandris marked this pull request as ready for review May 11, 2026 03:38
@macroscopeapp
macroscopeapp Bot dismissed their stale review May 11, 2026 03:38

Dismissing prior approval to re-evaluate fb8297c

@samjandris samjandris changed the title wip: Fix OpenCode event session routing Fix OpenCode event session routing May 11, 2026
@samjandris
Fix OpenCode event session routing
f4137b5
@samjandris
samjandris force-pushed the feature/feat/opencode-content-delta branch from fb8297c to f4137b5 Compare May 11, 2026 12:15
@github-actions github-actions Bot added size:S 10-29 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels May 11, 2026
@samjandris samjandris closed this May 13, 2026
@samjandris
samjandris deleted the feature/feat/opencode-content-delta branch May 13, 2026 11:57
@samjandris samjandris mentioned this pull request May 13, 2026
Fix OpenCode events on versions greater than 1.14.40 #2673
Closed
@samjandris

samjandris commented May 13, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Author

Replacement PR opened from the corrected fork branch: #2673 (samjandris:fix/opencode-event-stream).

All reactions

Sorry, something went wrong.

Uh oh!

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cursor cursor[bot] cursor[bot] left review comments
@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] left review comments

Uh oh!

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

Assignees

No one assigned

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Bug]: OpenCode not syncing/working

Uh oh!

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

1 participant

@samjandris
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.