Skip to content

Merge shuvcode-dev: v1.1.26 sync + fork refinements#315

Merged
shuv1337 merged 193 commits intointegrationfrom
shuvcode-dev
Jan 20, 2026
Merged

Merge shuvcode-dev: v1.1.26 sync + fork refinements#315
shuv1337 merged 193 commits intointegrationfrom
shuvcode-dev

Conversation

@shuv1337
Copy link
Collaborator

@shuv1337 shuv1337 commented Jan 20, 2026

Summary

Merge v1.1.26 upstream sync and fork-specific refinements into integration branch.

Changes

Upstream Sync (v1.1.26)

  • New session layout with improved styling and layout flow
  • E2E test infrastructure with Playwright (packages/app/e2e/)
  • apply_patch tool for OpenAI models replacing patch tool
  • Workspace/worktree management features (reset, delete)
  • Scheduler module for task orchestration
  • Vim-style line-by-line scrolling keybinds (j/k)
  • Session unshare button in desktop
  • Command execute before hook
  • Nix flake overhaul with improved packages
  • GitHub Copilot GPT-5+ auto-routing to Responses API
  • OSC 52 clipboard support centralized for SSH sessions
  • Mouse permission buttons in TUI
  • Batch tool max increased from 10 to 25
  • Various UI/UX fixes (search modal, tooltips, project editing)

Fork Refinements

  • Update Autocomplete API: onActiveChange → onMove in pickers
  • Fix duplicate 'opened' property in layout context
  • Update Editor.open return handling (result?.ok pattern)
  • Add slashes() method to dialog-command for slash filtering
  • Remove SessionMessageRail from session page
  • Update enterprise share page to shuvcode branding (AsciiLogo)

Breaking Changes

None

Testing

  • Typecheck passes (bun turbo typecheck)
  • Existing tests cover changes

Greptile Summary

This PR successfully merges v1.1.26 upstream sync with fork-specific refinements for the shuvcode fork. The changes integrate substantial upstream improvements including the new apply_patch tool (replacing patch for OpenAI models), scheduler infrastructure, worktree management, E2E testing with Playwright, and numerous UX enhancements.

Key Changes:

  • Fork refinements: Autocomplete API migrated from onActiveChange to onMove pattern via new slashes() method in dialog-command; fixed duplicate terminalOpened/reviewPanelOpened properties in layout context by moving to global store; removed SessionMessageRail component; updated enterprise branding to shuvcode
  • Upstream features: New apply_patch tool with comprehensive hunk parsing and permission validation; scheduler module for task orchestration; worktree management for workspace operations; Playwright E2E test suite; vim-style j/k scrolling; GitHub Copilot GPT-5+ routing; OSC 52 clipboard support; batch tool limit increased to 25
  • Minor style issue: The fork changes use result?.ok pattern when checking Editor.open() return value, but Editor.open() always returns a Result object (never undefined), making optional chaining unnecessary though functionally safe

The upstream merge appears clean with no conflicts, and the fork-specific changes are minimal and focused. All changes align with the codebase architecture patterns (SolidJS reactive patterns, Bun runtime, Result types).

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • Clean upstream merge with well-tested changes (176 files). Fork refinements are minimal, focused, and follow established patterns. Only minor style improvement suggested (unnecessary optional chaining). The new apply_patch tool includes proper validation and permission checks. Scheduler and worktree modules follow the existing namespace-based architecture. E2E test infrastructure adds confidence to future changes.
  • No files require special attention - the optional chaining style improvements are minor and non-blocking

Important Files Changed

Filename Overview
packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx Updated Editor.open handling with optional chaining pattern (result?.ok); removed usage command and paste handling logic
packages/opencode/src/cli/cmd/tui/component/prompt/autocomplete.tsx Refactored to use dialog-command slashes() method; improved mouse/keyboard input tracking; added ctrl+p/n keybinds
packages/opencode/src/cli/cmd/tui/component/dialog-command.tsx Added slashes() method to extract slash commands from options for use in autocomplete
packages/app/src/context/layout.tsx Fixed duplicate session view properties; refactored terminal/review panel state to use global store instead of per-session; improved color assignment logic
packages/opencode/src/tool/apply_patch.ts New tool implementation to replace patch tool for OpenAI models; handles add/update/delete/move operations with permission checking
packages/opencode/src/cli/cmd/tui/routes/session/index.tsx Major refactoring with Editor.open result?.ok pattern; added vim-style j/k scrolling; updated command structure

Sequence Diagram

sequenceDiagram
    participant User
    participant TUI as TUI/Session
    participant Autocomplete
    participant DialogCommand
    participant Editor
    participant ApplyPatch as apply_patch Tool
    participant Scheduler
    participant Worktree

    Note over User,Worktree: Fork Refinements: Autocomplete API Changes
    User->>TUI: Type "/" to trigger autocomplete
    TUI->>Autocomplete: Show slash commands
    Autocomplete->>DialogCommand: slashes() - get slash commands
    DialogCommand-->>Autocomplete: Return filtered slash options
    Autocomplete->>Autocomplete: Track input mode (keyboard/mouse)
    Autocomplete-->>User: Display options with ctrl+p/n navigation

    Note over User,Worktree: Fork Refinements: Editor Integration
    User->>TUI: Trigger /editor command
    TUI->>Editor: open({ value, renderer })
    Editor->>Editor: Create temp file, spawn $EDITOR
    Editor-->>TUI: Return Result (never undefined)
    TUI->>TUI: Check result?.ok (unnecessary optional chaining)
    TUI-->>User: Update prompt with edited content

    Note over User,Worktree: Upstream Sync: apply_patch Tool
    User->>TUI: Request code changes
    TUI->>ApplyPatch: execute({ patchText })
    ApplyPatch->>ApplyPatch: Parse patch hunks
    ApplyPatch->>ApplyPatch: Validate file paths & permissions
    ApplyPatch->>ApplyPatch: Apply changes (add/update/delete/move)
    ApplyPatch-->>TUI: Return changed files
    TUI-->>User: Display results

    Note over User,Worktree: Upstream Sync: Scheduler & Worktree
    TUI->>Scheduler: register({ id, interval, run })
    Scheduler->>Scheduler: Create timer (instance/global scope)
    loop Every interval
        Scheduler->>Scheduler: run() task
    end
    
    User->>Worktree: Reset/delete workspace
    Worktree->>Worktree: Manage git worktree operations
    Worktree-->>User: Workspace updated
Loading

ariane-emory and others added 30 commits January 16, 2026 21:57
rekram1-node and others added 23 commits January 19, 2026 12:18
Resolved conflicts:
- Deleted upstream files (update-nix-hashes.yml, nix/bundle.ts, nix/scripts/bun-build.ts, session-message-rail.css)
- Accepted upstream for stats/nix/docs (STATS.md, nix/hashes.json, flake.lock, README.md)
- Preserved fork branding (shuvcode ASCII logo, share.shuv.ai URLs)
- Preserved PWA customizations (mobile viewport, prompt-dock)
- Preserved TUI customizations (tips.tsx with shuv.ai references)
- Preserved desktop features (index.html with shuvcode title, __OPENCODE__ init)
- Updated Editor.open to handle Result type
- Added slashes() method to command dialog for autocomplete
- Removed SessionMessageRail (upstream removed this feature)
- Fixed ListProps usage (onActiveChange -> onMove)
- Fixed duplicate property in layout.tsx
- Rename onActiveChange to onMove in font/theme pickers
- Fix duplicate 'opened' property in layout context
- Update Editor.open to use result object pattern (result?.ok)
- Add slashes() method to dialog-command for slash filtering
- Remove SessionMessageRail from session page
- Update enterprise share page to shuvcode branding
@shuv1337
Copy link
Collaborator Author

Closing to clean up commit history from v1.1.26 merge

@shuv1337 shuv1337 closed this Jan 20, 2026
@shuv1337 shuv1337 reopened this Jan 20, 2026
Prevents accidental releases from feature branches by adding branch check
to the workflow_dispatch condition. Only integration branch can trigger
snapshot releases manually.
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.

160 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

const value = text
const result = await Editor.open({ value, renderer })
if (!result.ok) return
if (!result?.ok) return
Copy link

Choose a reason for hiding this comment

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

style: Editor.open() always returns a Result object (never undefined), so optional chaining is unnecessary here

Suggested change
if (!result?.ok) return
if (!result.ok) return
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
Line: 251:251

Comment:
**style:** `Editor.open()` always returns a `Result` object (never undefined), so optional chaining is unnecessary here

```suggestion
          if (!result.ok) return
```

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

const result = await Editor.open({ value: transcript, renderer })
if (result.ok) {
// User edited the file, save the changes
if (result?.ok) {
Copy link

Choose a reason for hiding this comment

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

style: Editor.open() always returns a Result object (never undefined), so optional chaining is unnecessary

Suggested change
if (result?.ok) {
if (result.ok) {
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
Line: 839:839

Comment:
**style:** `Editor.open()` always returns a `Result` object (never undefined), so optional chaining is unnecessary

```suggestion
            if (result.ok) {
```

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

Apply Greptile review suggestion - Editor.open() always returns a Result
object, so optional chaining is unnecessary.
@shuv1337 shuv1337 merged commit 17c299a into integration Jan 20, 2026
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.