Skip to content

Conversation

@shuv1337
Copy link
Collaborator

@shuv1337 shuv1337 commented Dec 30, 2025

Summary

  • Synced upstream releases v1.0.210 through v1.0.218
  • Rebranded desktop package to @shuvcode/desktop
  • Added Shuvcode window API with opencode fallbacks
  • Improved dev server proxy configuration
  • Added dev LAN access investigation documentation

Upstream Changes (v1.0.210 → v1.0.218)

  • Desktop system notifications and readline shortcuts
  • Variants toggle feature
  • Model list corruption fix
  • Prisma language server support
  • Extract reasoning middleware
  • Various bug fixes and improvements

Fork-specific Changes

  • Desktop Tauri rebrand to Shuvcode
  • Server URL handling improvements
  • Dev server proxy configuration
  • Documentation updates

Greptile Summary

This PR successfully merges upstream releases v1.0.210 through v1.0.218 while rebranding the desktop package from @opencode-ai/desktop to @shuvcode/desktop.

Major Changes:

  • Desktop rebrand with __SHUVCODE__ window API (maintains __OPENCODE__ fallback for compatibility)
  • Refactored server URL management with new ServerProvider context supporting multiple servers with health checks
  • Added system notification support via platform.notify() API for both Tauri and web
  • Improved dev server configuration with LAN access support (origin, HMR host/port, fs.allow)
  • Added readline-style keyboard shortcuts (Ctrl-A/E/B/F/D/K/U/W/Y/T, Alt-B/F/D) to prompt input
  • Integrated extractReasoningMiddleware and model variants support from upstream
  • Replaced "Open project" with "Add project" terminology
  • Added new server selector dialog with health indicators

Upstream Features:

  • Desktop system notifications and readline shortcuts
  • Variants toggle feature
  • Model list corruption fix
  • Prisma language server support
  • Extract reasoning middleware
  • Various bug fixes and improvements

Confidence Score: 4/5

  • This PR is safe to merge with minor attention to commented sourcemap configs
  • The changes are well-structured and maintain backward compatibility (__OPENCODE__ fallbacks). The rebrand is comprehensive, upstream sync is clean, and new features (notifications, server management) are properly implemented. Score reflects one minor issue: commented-out sourcemap configuration should be removed rather than commented
  • Pay attention to packages/app/vite.config.ts and packages/desktop/vite.config.ts where sourcemap configs are commented out

Important Files Changed

Filename Overview
packages/app/src/app.tsx Refactored server URL logic to use ServerProvider, added __SHUVCODE__ window API with opencode fallback, simplified default URL detection
packages/app/src/context/server.tsx New server context for managing multiple server URLs, includes health checking and project management per server
packages/desktop/src/index.tsx Added notify function with permission handling and window focus management
packages/app/vite.config.ts Added dev server configuration for LAN access (origin, HMR, fs.allow), disabled sourcemaps
packages/app/src/components/prompt-input.tsx Added readline-style keyboard shortcuts (Ctrl-A/E/B/F/D/K/U/W/Y/T, Alt-B/F/D) and kill buffer functionality
packages/opencode/src/session/llm.ts Added extractReasoningMiddleware and variant support for model options

Sequence Diagram

sequenceDiagram
    participant User
    participant App as App.tsx
    participant ServerCtx as ServerProvider
    participant GlobalSDK as GlobalSDKProvider
    participant Platform as Platform API
    participant Backend as OpenCode Server

    User->>App: Load application
    App->>App: Determine defaultServerUrl<br/>(query param → __SHUVCODE__ → origin)
    App->>ServerCtx: Initialize with defaultServerUrl
    ServerCtx->>ServerCtx: Load persisted servers from localStorage
    ServerCtx->>Backend: Health check active server
    Backend-->>ServerCtx: Health status
    
    ServerCtx->>GlobalSDK: Provide server.url
    GlobalSDK->>Backend: Connect event stream
    GlobalSDK->>GlobalSDK: Create SDK client
    
    User->>User: Interacts with app
    Backend->>GlobalSDK: SSE events
    GlobalSDK->>App: Emit events to components
    
    opt User switches server
        User->>ServerCtx: Select different server
        ServerCtx->>ServerCtx: Update active URL
        ServerCtx->>GlobalSDK: New server.url
        GlobalSDK->>Backend: Reconnect to new server
    end
    
    opt Notification triggered
        Backend->>GlobalSDK: Event requires notification
        GlobalSDK->>Platform: notify(title, description, href)
        Platform->>Platform: Check permission & focus state
        Platform->>User: Show system notification
        User->>Platform: Click notification
        Platform->>App: Focus window & navigate to href
    end
Loading

rekram1-node and others added 30 commits December 29, 2025 17:46
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: Github Action <action@github.com>
…#6359)

Co-authored-by: Joachim Isaksson <joachim.isaksson@centiro.com>
shuv1337 and others added 28 commits December 30, 2025 10:03
- Simplify defaultServerUrl in app.tsx to match upstream implementation
- Add shuv.ai domain support alongside opencode.ai
- Remove lib/server-url.ts (URL validation/history now in server context)
- Remove dialog-server-settings.tsx (use upstream's DialogSelectServer)
- Simplify error.tsx by removing custom server URL configuration
- Update layout.tsx to use DialogSelectServer instead of deleted dialog

This reduces ~400 lines while maintaining full functionality.
@shuv1337 shuv1337 merged commit 4e7375c into integration Dec 30, 2025
2 checks passed
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

116 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

build: {
target: "esnext",
sourcemap: true,
// sourcemap: true,
Copy link

Choose a reason for hiding this comment

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

style: Remove commented code instead of leaving it in. If sourcemaps should be disabled, remove the lines entirely.

Suggested change
// sourcemap: true,
},

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/app/vite.config.ts
Line: 159:159

Comment:
**style:** Remove commented code instead of leaving it in. If sourcemaps should be disabled, remove the lines entirely.

```suggestion
  },
```

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +17 to +19
// build: {
// sourcemap: true,
// },
Copy link

Choose a reason for hiding this comment

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

style: Remove commented code instead of leaving it in.

Suggested change
// build: {
// sourcemap: true,
// },
},

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/desktop/vite.config.ts
Line: 17:19

Comment:
**style:** Remove commented code instead of leaving it in.

```suggestion
  },
```

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

await Promise.resolve()
.then(() => {
const notification = new Notification(title, { body: description ?? "" })
notification.onclick = () => {
Copy link

Choose a reason for hiding this comment

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

logic: getCurrentWindow() is called twice - the outer win variable is already available from line 104.

Suggested change
notification.onclick = () => {
notification.onclick = () => {
void win.show().catch(() => undefined)
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/desktop/src/index.tsx
Line: 111:111

Comment:
**logic:** `getCurrentWindow()` is called twice - the outer `win` variable is already available from line 104.

```suggestion
          notification.onclick = () => {
            void win.show().catch(() => undefined)
```

How can I resolve this? If you propose a fix, please make it concise.

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.