Skip to content

Conversation

@shuv1337
Copy link
Collaborator

@shuv1337 shuv1337 commented Dec 10, 2025

Summary

  • Merge upstream v1.0.141 from sst/opencode
  • Resolve all merge conflicts preserving fork-specific customizations
  • Update sync marker to v1.0.141

Resolved Conflicts

File Resolution
.github/workflows/publish.yml Removed (keep fork workflows)
.github/workflows/snapshot.yml Kept ours (fork-specific)
packages/desktop/src/context/global-sync.tsx Merged (error handling + color feature)
packages/desktop/src/pages/layout.tsx Merged (added feedback button)
packages/opencode/script/publish.ts Kept ours (fork publishing)
packages/plugin/script/publish.ts Kept ours (skip plugin publish)
packages/script/src/index.ts Kept ours (version logic)
packages/sdk/js/openapi.json Removed (deleted upstream)
packages/sdk/js/script/publish.ts Kept ours (skip SDK publish)
packages/sdk/openapi.json Accepted upstream
script/publish.ts Kept ours (fork publishing)

Closes #102

Summary by CodeRabbit

Release Notes

  • New Features

    • Added dynamic placeholder suggestions in input prompts.
    • Introduced project icons and pastel color theming.
    • Added terminal tab drag-and-drop reordering in session page.
    • Enabled avatar images with optional fallback support.
    • Added PATCH endpoint to update project name and icon.
  • Improvements

    • Display dynamic relative timestamps for recent projects.
    • Enhanced event system architecture.
    • Updated SDK imports to v2.

✏️ Tip: You can customize this high-level summary in your review settings.

thdxr and others added 23 commits December 9, 2025 20:56
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
npm dist-tag add command is broken, so publish package multiple times
with different tags directly instead
Resolved conflicts:
- .github/workflows/publish.yml - removed (keep fork-specific workflows)
- .github/workflows/snapshot.yml - kept ours (fork-specific workflow)
- packages/desktop/src/context/global-sync.tsx - merged (preserved error handling with upstream color feature)
- packages/desktop/src/pages/layout.tsx - merged (added upstream feedback button)
- packages/opencode/script/publish.ts - kept ours (fork-specific publishing)
- packages/plugin/script/publish.ts - kept ours (skip plugin publish for fork)
- packages/script/src/index.ts - kept ours (version logic)
- packages/sdk/js/openapi.json - removed (deleted upstream)
- packages/sdk/js/script/publish.ts - kept ours (skip SDK publish for fork)
- packages/sdk/openapi.json - accepted upstream (openapi schema)
- script/publish.ts - kept ours (fork-specific publishing)
- bun.lock - regenerated
@shuv1337 shuv1337 merged commit 77b9d63 into integration Dec 10, 2025
@shuv1337 shuv1337 deleted the opencode/issue102-20251210030021 branch December 10, 2025 03:09
@coderabbitai
Copy link

coderabbitai bot commented Dec 10, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Upstream sync from v1.0.138 to v1.0.141 introduces architectural event system refactoring (Bus.event → BusEvent.define), workflow reorganization for SDK generation, project management enhancements with color theming and worktree identifiers, desktop UI refinements, and updated API schemas supporting project updates and interleaved reasoning capabilities.

Changes

Cohort / File(s) Summary
Version bumps
.github/last-synced-tag, packages/*/package.json, packages/extensions/zed/extension.toml, sdks/vscode/package.json
Updated version strings across all package manifests from 1.0.138 to 1.0.141 and extension release URLs.
GitHub Actions workflow reorganization
.github/workflows/generate.yml, .github/workflows/sdk.yml
Renamed "format" workflow to "generate", refactored to separate SDK generation (bun build TypeScript SDK + generate openapi.json) from formatting step; removed workflow_run trigger and consolidated job logic. Deleted sdk.yml workflow.
OpenCode configuration
.opencode/command/commit.md, .opencode/opencode.jsonc
Added model field to commit.md front matter; simplified provider.opencode options to empty object.
Event system refactoring (Bus → BusEvent)
packages/opencode/src/bus/*, packages/opencode/src/*/index.ts, packages/opencode/src/cli/cmd/tui/event.ts, packages/opencode/src/command/index.ts, packages/opencode/src/file/*, packages/opencode/src/ide/index.ts, packages/opencode/src/installation/index.ts, packages/opencode/src/lsp/*, packages/opencode/src/permission/index.ts, packages/opencode/src/pty/index.ts, packages/opencode/src/server/*, packages/opencode/src/session/*, packages/opencode/src/tool/*
Introduced BusEvent namespace with define() and payloads() API; replaced all Bus.event() calls with BusEvent.define() across event definitions; removed EventDefinition type and local registry.
Project management enhancements
packages/opencode/src/project/project.ts, packages/opencode/src/project/vcs.ts, packages/opencode/src/server/project.ts
Added project schema fields (name, icon with color); added Project.Event.Updated; implemented project discovery and update; new PATCH /project/:projectID endpoint; simplified vcsDir handling.
Desktop app context updates
packages/desktop/src/context/global-sync.tsx, packages/desktop/src/context/global-sdk.tsx, packages/desktop/src/context/layout.tsx, packages/desktop/src/context/session.tsx, packages/desktop/src/context/sync.tsx
Added pastel color theming for projects; migrated project identifier from directory to worktree; introduced project enrichment with global metadata; updated session storage naming; added project getter to sync context.
Desktop UI improvements
packages/desktop/src/pages/home.tsx, packages/desktop/src/pages/layout.tsx, packages/desktop/src/pages/session.tsx, packages/desktop/src/components/prompt-input.tsx
Added dynamic placeholder cycling; sorted recent projects by activity; replaced directory refs with worktree; introduced ProjectVisual component; added drag-and-drop terminal tab reordering; updated Last Modified display.
SDK and API updates
packages/sdk/openapi.json, packages/sdk/js/script/build.ts, packages/opencode/src/server/server.ts
Added PATCH /project endpoint schema; introduced Event.project.updated and installation events; added Project schema; extended Model capabilities with interleaved reasoning field; cleanup of openapi.json post-build.
Provider and tool enhancements
packages/opencode/src/provider/models.ts, packages/opencode/src/provider/provider.ts, packages/opencode/src/provider/transform.ts, packages/opencode/src/tool/bash.ts, packages/opencode/src/tool/read.ts
Added interleaved capability (boolean or object with field selector) to model schema; extended providerOptions with messages parameter; updated bash tool constants to use new flag helpers; excluded SVG from image classification.
UI component enhancements
packages/ui/src/components/avatar.tsx, packages/ui/src/components/avatar.css, packages/ui/src/components/button.css, packages/ui/src/components/message-*.tsx, packages/ui/src/components/session-*.tsx, packages/ui/src/context/data.tsx
Added image support to Avatar; enhanced button active state styling; refactored session turn animations from sessionStorage to state-driven; updated all SDK imports from "@opencode-ai/sdk" to "@opencode-ai/sdk/v2".
CLI and test utilities
packages/opencode/src/bun/index.ts, packages/opencode/src/flag/flag.ts, packages/opencode/src/cli/cmd/tui/routes/session/index.tsx, packages/opencode/test/*
Resolved actual installed package versions for "latest"; added BASH timeout/length flag helpers; added test fixture sanitization; expanded test preload with dedicated XDG dirs; added Project.discover tests.
Enterprise and integration packages
packages/enterprise/src/core/share.ts, packages/enterprise/src/routes/share/[shareID].tsx, packages/util/src/sanitize.ts, packages/ui/src/styles/*
Updated SDK imports to v2; removed large radius tokens, added --radius-lg; added portal project to ecosystem docs.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Areas requiring extra attention:

  • Event system refactoring: Pervasive Bus.event → BusEvent.define migration across 20+ files; verify all event names, payload schemas, and registry behavior are preserved
  • Project management rework: Complex state changes (directory → worktree migration, color theming, project enrichment logic) affecting multiple context layers; validate session migration and global project handling
  • Workflow reorganization: SDK generation step integration and artifact cleanup; ensure build pipeline ordering and artifact dependencies are correct
  • Desktop context/UI refactoring: Multiple context provider updates with interdependencies (global-sync, layout, session); verify data flow and store mutations align
  • OpenAPI schema changes: New project PATCH endpoint, Event union expansion, Model.capabilities.interleaved additions; confirm type consistency across SDK gen and server implementation

Possibly related PRs

  • sync: merge upstream v1.0.133 #87: Related upstream sync performing similar version bumps and .github/last-synced-tag updates
  • Integration #32: Overlapping code-level changes to event bus refactoring (Bus.event → BusEvent.define), server project endpoints, and provider/model enhancements
  • sync: merge upstream v1.0.129 #79: Prior upstream sync modifying overlapping files (.opencode configs, CLI/TUI components, package versions)

Poem

🐰 From one-point-one to one-point-four-oh,
We synced from upstream, let the changes flow!
Events now define themselves with grace,
Projects paint with pastel color and place,
Workflows spin faster, desktops shine bright—
What a delightful upstream delight!

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch opencode/issue102-20251210030021

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 92c8338 and 126fd12.

⛔ Files ignored due to path filters (4)
  • bun.lock is excluded by !**/*.lock
  • flake.lock is excluded by !**/*.lock
  • packages/sdk/js/src/v2/gen/sdk.gen.ts is excluded by !**/gen/**
  • packages/sdk/js/src/v2/gen/types.gen.ts is excluded by !**/gen/**
📒 Files selected for processing (87)
  • .github/last-synced-tag (1 hunks)
  • .github/workflows/generate.yml (3 hunks)
  • .github/workflows/sdk.yml (0 hunks)
  • .opencode/command/commit.md (1 hunks)
  • .opencode/opencode.jsonc (1 hunks)
  • packages/console/app/package.json (1 hunks)
  • packages/console/core/package.json (1 hunks)
  • packages/console/function/package.json (1 hunks)
  • packages/console/mail/package.json (1 hunks)
  • packages/desktop/package.json (1 hunks)
  • packages/desktop/src/components/prompt-input.tsx (5 hunks)
  • packages/desktop/src/context/global-sdk.tsx (1 hunks)
  • packages/desktop/src/context/global-sync.tsx (4 hunks)
  • packages/desktop/src/context/layout.tsx (3 hunks)
  • packages/desktop/src/context/session.tsx (1 hunks)
  • packages/desktop/src/context/sync.tsx (2 hunks)
  • packages/desktop/src/pages/home.tsx (3 hunks)
  • packages/desktop/src/pages/layout.tsx (11 hunks)
  • packages/desktop/src/pages/session.tsx (5 hunks)
  • packages/enterprise/package.json (1 hunks)
  • packages/enterprise/src/core/share.ts (1 hunks)
  • packages/enterprise/src/routes/share/[shareID].tsx (1 hunks)
  • packages/extensions/zed/extension.toml (2 hunks)
  • packages/function/package.json (1 hunks)
  • packages/opencode/package.json (2 hunks)
  • packages/opencode/src/acp/agent.ts (0 hunks)
  • packages/opencode/src/bun/index.ts (1 hunks)
  • packages/opencode/src/bus/bus-event.ts (1 hunks)
  • packages/opencode/src/bus/global.ts (1 hunks)
  • packages/opencode/src/bus/index.ts (3 hunks)
  • packages/opencode/src/cli/cmd/tui/event.ts (2 hunks)
  • packages/opencode/src/cli/cmd/tui/routes/session/index.tsx (1 hunks)
  • packages/opencode/src/command/index.ts (1 hunks)
  • packages/opencode/src/file/index.ts (2 hunks)
  • packages/opencode/src/file/watcher.ts (3 hunks)
  • packages/opencode/src/flag/flag.ts (1 hunks)
  • packages/opencode/src/ide/index.ts (2 hunks)
  • packages/opencode/src/installation/index.ts (2 hunks)
  • packages/opencode/src/lsp/client.ts (2 hunks)
  • packages/opencode/src/lsp/index.ts (2 hunks)
  • packages/opencode/src/lsp/server.ts (1 hunks)
  • packages/opencode/src/permission/index.ts (2 hunks)
  • packages/opencode/src/project/project.ts (3 hunks)
  • packages/opencode/src/project/vcs.ts (2 hunks)
  • packages/opencode/src/provider/models.ts (1 hunks)
  • packages/opencode/src/provider/provider.ts (3 hunks)
  • packages/opencode/src/provider/transform.ts (1 hunks)
  • packages/opencode/src/pty/index.ts (2 hunks)
  • packages/opencode/src/server/project.ts (2 hunks)
  • packages/opencode/src/server/server.ts (5 hunks)
  • packages/opencode/src/session/compaction.ts (3 hunks)
  • packages/opencode/src/session/index.ts (2 hunks)
  • packages/opencode/src/session/message-v2.ts (2 hunks)
  • packages/opencode/src/session/prompt.ts (3 hunks)
  • packages/opencode/src/session/status.ts (2 hunks)
  • packages/opencode/src/session/summary.ts (2 hunks)
  • packages/opencode/src/session/todo.ts (2 hunks)
  • packages/opencode/src/tool/bash.ts (1 hunks)
  • packages/opencode/src/tool/read.ts (1 hunks)
  • packages/opencode/test/fixture/fixture.ts (1 hunks)
  • packages/opencode/test/preload.ts (1 hunks)
  • packages/opencode/test/project/project.test.ts (2 hunks)
  • packages/opencode/test/provider/transform.test.ts (4 hunks)
  • packages/plugin/package.json (1 hunks)
  • packages/sdk/js/package.json (1 hunks)
  • packages/sdk/js/script/build.ts (1 hunks)
  • packages/sdk/openapi.json (7 hunks)
  • packages/slack/package.json (1 hunks)
  • packages/tauri/package.json (1 hunks)
  • packages/ui/package.json (1 hunks)
  • packages/ui/src/components/avatar.css (1 hunks)
  • packages/ui/src/components/avatar.tsx (1 hunks)
  • packages/ui/src/components/button.css (2 hunks)
  • packages/ui/src/components/message-nav.tsx (1 hunks)
  • packages/ui/src/components/message-part.tsx (1 hunks)
  • packages/ui/src/components/message-progress.tsx (1 hunks)
  • packages/ui/src/components/session-message-rail.tsx (1 hunks)
  • packages/ui/src/components/session-review.tsx (1 hunks)
  • packages/ui/src/components/session-turn.tsx (6 hunks)
  • packages/ui/src/context/data.tsx (1 hunks)
  • packages/ui/src/styles/tailwind/index.css (0 hunks)
  • packages/ui/src/styles/theme.css (1 hunks)
  • packages/util/package.json (1 hunks)
  • packages/util/src/sanitize.ts (1 hunks)
  • packages/web/package.json (1 hunks)
  • packages/web/src/content/docs/ecosystem.mdx (1 hunks)
  • sdks/vscode/package.json (1 hunks)

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

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

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 49 to 51
const unsubscribe = Bus.subscribe(FileWatcher.Event.Updated, async (evt) => {
if (evt.properties.file !== head) return
if (evt.properties.file.endsWith("HEAD")) return
const next = await currentBranch()

Choose a reason for hiding this comment

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

P1 Badge Branch updates skipped on HEAD changes

The VCS watcher now returns immediately when the updated path ends with HEAD, which means branch changes (the only time .git/HEAD changes) no longer trigger a refresh. Previously the handler ran only for HEAD updates; with the inverted condition the branch check and vcs.branch.updated event are skipped unless some unrelated file happens to change afterwards, so the UI can stay on the old branch after a checkout.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Upstream Sync] Merge conflict with v1.0.141

10 participants