Skip to content

fix: resolve issues #240, #238, #234 and sync v1.0.223#242

Merged
shuv1337 merged 13 commits intointegrationfrom
shuvcode-dev
Jan 1, 2026
Merged

fix: resolve issues #240, #238, #234 and sync v1.0.223#242
shuv1337 merged 13 commits intointegrationfrom
shuvcode-dev

Conversation

@shuv1337
Copy link
Collaborator

@shuv1337 shuv1337 commented Jan 1, 2026

Summary

This PR merges bug fixes for issues #240, #238, and #234 into the integration branch, along with the latest upstream synchronization (v1.0.223) and other improvements from shuvcode-dev.

Changes

Features

Fixes

  • Branding (Remove OpenCode 'O' logo mark from sidebar menu #234): Removed OpenCode Mark logo from the sidebar to align with shuvcode branding.
  • Mobile UX: Hidden status bar on mobile to prevent iPhone dynamic island safe area issues.
  • TUI Stability: Fixed Editor.open Result type handling and Agent not found toast issues for subagents.
  • Checksums: Added defensiveness to checksum utility.

Sync

  • Merged upstream v1.0.223 into the fork.
  • Updated dependencies in bun.lock and flake.lock.

Testing

  • Automated tests for AskQuestion tool passed (bun test packages/opencode/test/tool/askquestion.test.ts).
  • Production build and test cycle for both CLI and Web UI completed successfully.
  • Manual verification of branding and spinner fixes in TUI.

Greptile Summary

This PR merges upstream v1.0.223 into the integration branch and adds two fork-specific fixes.

Key Changes:

  • Upstream Sync (v1.0.223): Integrated context window usage component, checksum defensiveness fix, primitive color updates, and subagent toast handling improvements
  • Mobile Fix: Hidden status bar on mobile to prevent iPhone dynamic island safe area issues (wrapped StatusBar in hidden sm:block div)
  • TUI Fix: Updated Editor.open call to handle new Result type return value (changed from string to Result object with ok/content fields)
  • Merge Conflicts: Resolved conflicts in session.tsx (preserved fork's mobile features while accepting upstream refactor) and prompt/index.tsx (accepted upstream subagent toast fix)

Note on PR Description: The PR description mentions fixes for issues #240 (AskQuestion tool), #238 (spinner customization), and #234 (branding). However, these issues were already resolved in previous commits on the shuvcode-dev branch that were merged before this PR. The actual changes in THIS PR are the upstream sync and the two fixes listed above.

Confidence Score: 3/5

  • This PR has one critical type safety issue that needs to be resolved before merging
  • The upstream checksum function change from returning string to string | undefined introduces a type mismatch at all call sites where the result is passed to cacheKey properties. This could cause TypeScript compilation errors or runtime issues if not handled properly. The other changes (mobile status bar fix and Editor.open Result handling) are correctly implemented.
  • packages/util/src/encode.ts requires immediate attention - the checksum return type change needs either reversion or comprehensive call site updates

Important Files Changed

Filename Overview
packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx Fixed Editor.open Result type handling after upstream API change
packages/app/src/pages/session.tsx Merged upstream context window feature and added mobile status bar fix
packages/util/src/encode.ts Changed checksum to return undefined for empty input (upstream fix)

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Fork as shuvcode-dev
    participant Int as integration branch
    participant Up as Upstream v1.0.223
    
    Note over Fork: Issues #240, #238, #234<br/>already fixed in shuvcode-dev
    
    Dev->>Int: Commit: Hide status bar on mobile<br/>(iPhone dynamic island fix)
    
    Dev->>Int: Merge upstream v1.0.223
    Up->>Int: feat: Context window view
    Up->>Int: fix: Checksum defensiveness
    Up->>Int: fix: Subagent toast handling
    Up->>Int: fix: Update primitive colors
    
    Note over Int: Merge conflicts resolved:<br/>- session.tsx (preserved mobile features)<br/>- prompt/index.tsx (upstream subagent fix)
    
    Dev->>Int: Post-merge fix:<br/>Editor.open Result type handling
    
    Note over Int: Final state:<br/>✓ Mobile status bar hidden<br/>✓ Context window feature<br/>✓ Checksum returns undefined<br/>✓ Editor.open uses Result type
Loading

actions-user and others added 13 commits January 1, 2026 01:21
Upstream changes:
- feat(app): context window window
- fix(util): checksum defensiveness
- fix(app): update primitive colors
- fix(tui): don't show 'Agent not found' toast for subagents

Resolved conflicts:
- packages/app/src/pages/session.tsx: accepted upstream refactor, preserved fork mobile features (StatusBar, keyboard visibility, mobile state)
- packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx: accepted upstream fix for subagent toast
… prop

Upstream v1.0.223 changed Editor.open to return Result type but didn't
update all call sites. Also adds missing onSearchToggle prop to PromptProps.
@shuv1337 shuv1337 merged commit 0a7a00e into integration Jan 1, 2026
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.

25 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines +22 to +23
export function checksum(content: string): string | undefined {
if (!content) return undefined
Copy link

Choose a reason for hiding this comment

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

logic: changing return type from string to string | undefined could cause type issues

all call sites pass checksum result to cacheKey properties without handling potential undefined value (session.tsx line 1197, message-part.tsx line 917). if FileContents.cacheKey expects string, this causes TypeScript errors

consider:

  • keep return type as string and return empty string for defensive behavior, OR
  • update all call sites to handle undefined with nullish coalescing, OR
  • make cacheKey accept string | undefined if supported
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/util/src/encode.ts
Line: 22:23

Comment:
**logic:** changing return type from string to string | undefined could cause type issues

all call sites pass checksum result to cacheKey properties without handling potential undefined value (session.tsx line 1197, message-part.tsx line 917). if FileContents.cacheKey expects string, this causes TypeScript errors

consider:
- keep return type as string and return empty string for defensive behavior, OR
- update all call sites to handle undefined with nullish coalescing, OR
- make cacheKey accept string | undefined if supported

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.

4 participants