Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
46c7a41
fix: only show diagnostics block when errors exist (#6175)
JackNorris Dec 26, 2025
b6a2648
chore: generate
actions-user Dec 26, 2025
3522c46
tweak: update transform for gemini models so that topP and topK match…
rekram1-node Dec 26, 2025
2946a6d
ignore: update download stats 2025-12-26
actions-user Dec 26, 2025
cf38884
doc: fix typos in various files (#6196)
didier-durand Dec 26, 2025
dd569c9
chore: generate
actions-user Dec 26, 2025
26e7043
feat(core): optional mdns service (#6192)
adamdotdevin Dec 26, 2025
54588b4
chore: generate
actions-user Dec 26, 2025
2333af6
Desktop: MCP UI (#6162)
dbpolito Dec 26, 2025
f1ab427
fix(dep): Update package.json - fix perplexity provider version (#6199)
robertocarvajal Dec 26, 2025
155ba79
chore: createOpencodeServer expose `logLevel` (#6202)
AyushWalekar Dec 26, 2025
6345597
chore: generate
actions-user Dec 26, 2025
d5b47d9
Update Nix flake.lock and hashes
actions-user Dec 26, 2025
8416db0
tweak: make install script handle 404s better
rekram1-node Dec 26, 2025
b0e4408
feat: add shfmt formatter for shell scripts (#6204)
anntnzrb Dec 26, 2025
25c68c8
chore: kill the dead Polaris Alpha code (#6193)
ariane-emory Dec 26, 2025
1bcf8d8
fix: `opencode web` baseURL error (#6181)
rgodha24 Dec 26, 2025
4abaa05
fix: adjust upgrade command to use gh releases page if not npm/bun/pn…
rekram1-node Dec 26, 2025
2e10ffa
chore: rm comments
rekram1-node Dec 26, 2025
505068d
Revert "feat(core): optional mdns service (#6192)"
rekram1-node Dec 26, 2025
f4fdf0e
chore: generate
actions-user Dec 26, 2025
9afc451
Update Nix flake.lock and hashes
actions-user Dec 26, 2025
7a5fbdf
ci: update zed extension sync
rekram1-node Dec 26, 2025
e1c1b13
ci: fix var
rekram1-node Dec 26, 2025
053a10e
ci: fix token for gh
rekram1-node Dec 26, 2025
61ddd17
ci: re-enable sync zed
rekram1-node Dec 26, 2025
1626341
github: support issues and workflow_dispatch events (#6157)
elithrar Dec 26, 2025
160c8ab
tweak: bash tool description to avoid unnecessary 'cd &&' usage
rekram1-node Dec 26, 2025
664e6bf
test: add more tests to make sure that cwd is locked for read tool
rekram1-node Dec 26, 2025
1e2ef07
chore: kill some unused tools
rekram1-node Dec 26, 2025
b2f45d5
Reapply "feat(core): optional mdns service (#6192)"
adamdotdevin Dec 26, 2025
390b0a7
fix(core): mdns global config
adamdotdevin Dec 26, 2025
da39443
chore: generate
actions-user Dec 26, 2025
a15397c
Update Nix flake.lock and hashes
actions-user Dec 26, 2025
52b9962
zen: add context for login errors
Dec 26, 2025
ed06de5
core: add configurable compaction settings to allow users to disable …
thdxr Dec 27, 2025
f8fb08b
chore: generate
actions-user Dec 27, 2025
2cdc88d
core: add compaction config tests to verify auto and prune settings w…
thdxr Dec 27, 2025
2b054be
core: fix compaction config checks to properly respect user settings
thdxr Dec 27, 2025
4385fa4
fix(desktop): prompt input fixes, directory and branch in status bar
adamdotdevin Dec 27, 2025
1bcc72c
feat: add ability to disable spinner animation (#6084)
anntnzrb Dec 27, 2025
bfb9787
fix: compact command after revert now properly cleans up revert state…
ochsec Dec 27, 2025
3c02d5d
feat: add path traversal protection to File.read and File.list (#5985)
edlsh Dec 27, 2025
e6b9988
doc: fix typos in various files (#6238)
didier-durand Dec 27, 2025
4667d57
ci: stale issues
rekram1-node Dec 27, 2025
beb1d3e
feat(tui): reorder sidebar sections and make all collapsible
shuv1337 Dec 27, 2025
f98a4df
docs: add planning document for sidebar changes
shuv1337 Dec 27, 2025
685f3ea
ignore: update download stats 2025-12-27
actions-user Dec 27, 2025
c523ca4
wip(desktop): handle more errors
adamdotdevin Dec 27, 2025
21eba5f
feat(desktop): permissions
adamdotdevin Dec 27, 2025
7aecb43
release: v1.0.204
Dec 27, 2025
c45b607
Merge remote-tracking branch 'origin/integration' into shuvcode-dev
shuv1337 Dec 27, 2025
59bb8c8
sync: merge upstream v1.0.204 into shuvcode-dev for testing
shuv1337 Dec 27, 2025
444fbb7
sync: update last-synced-tag to v1.0.204
shuv1337 Dec 27, 2025
ef93d46
fix: resolve TypeScript deep type instantiation error in OpenAPI gene…
shuv1337 Dec 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/last-synced-tag
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.0.203
v1.0.204
2 changes: 1 addition & 1 deletion .github/workflows/review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
Please check all the code changes in this pull request against the style guide, also look for any bugs if they exist. Diffs are important but make sure you read the entire file to get proper context. Make it clear the suggestions are merely suggestions and the human can decide what to do

When critiquing code against the style guide, be sure that the code is ACTUALLY in violation, don't complain about else statements if they already use early returns there. You may complain about excessive nesting though, regardless of else statement usage.
When critiquing code style don't be a zealot, we don't like "let" statements but sometimes they are the simpliest option, if someone does a bunch of nesting with let, they should consider using iife (see packages/opencode/src/util.iife.ts)
When critiquing code style don't be a zealot, we don't like "let" statements but sometimes they are the simplest option, if someone does a bunch of nesting with let, they should consider using iife (see packages/opencode/src/util.iife.ts)

Use the gh cli to create comments on the files for the violations. Try to leave the comment on the exact line number. If you have a suggested fix include it in a suggestion code block.
If you are writing suggested fixes, BE SURE THAT the change you are recommending is actually valid typescript, often I have seen missing closing "}" or other syntax errors.
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/stale-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Auto-close stale issues"

on:
schedule:
- cron: "30 1 * * *" # Daily at 1:30 AM
workflow_dispatch:

jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/stale@v10
with:
days-before-stale: 90
days-before-close: 7
stale-issue-label: "stale"
close-issue-message: |
[automated] Closing due to 90+ days of inactivity.

Feel free to reopen if you still need this!
stale-issue-message: |
[automated] This issue has had no activity for 90 days.

It will be closed in 7 days if there's no new activity.
remove-stale-when-updated: true
exempt-issue-labels: "pinned,security,feature-request,on-hold"
start-date: "2025-12-27"
195 changes: 195 additions & 0 deletions CONTEXT/PLAN-sidebar-reorder-collapsible-2025-12-26.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
# Plan: Sidebar Section Reordering and Collapsible Sections

**Created:** 2025-12-26
**Status:** Completed
**Estimated Effort:** Small (1-2 hours)

## Overview

Reorganize the sidebar sections in the TUI session view and make all sections consistently collapsible. Currently, some sections have collapsible behavior while others do not, and the order doesn't match the desired hierarchy.

## Current State Analysis

### File Location
- **Primary file:** `packages/opencode/src/cli/cmd/tui/routes/session/sidebar.tsx`

### Current Section Order (lines 118-372)
1. Session title (line 110-117)
2. **Context** (lines 118-125)
3. **MCP** (lines 126-186) - Has collapsible behavior
4. **LSP** (lines 187-228) - Has collapsible behavior (threshold: >2 items)
5. **Subagents** (lines 230-309) - Has collapsible behavior (threshold: >2 items)
6. **Todo** (lines 310-328) - Has collapsible behavior (threshold: >2 items)
7. **Modified Files** (lines 329-372) - Has collapsible behavior (threshold: >2 items)

### Desired Section Order
1. Session title
2. **Context** - Make collapsible (new)
3. **Subagents** - Move up
4. **MCP** - Already collapsible
5. **LSP** - Already collapsible
6. **Modified Files** - Already collapsible (rename from "Modified Files" to "Changed Files" if desired)

**Note:** Todo section appears to be omitted from the desired order. Clarify with user if Todo should be removed or repositioned.

### Current Collapsible Implementation Pattern
Each collapsible section follows this pattern:
1. State tracked in `expanded` store (line 26-32)
2. Header with click handler to toggle (e.g., line 131)
3. Conditional arrow indicator `▼`/`▶` (e.g., line 134)
4. Show/hide content based on `expanded` state (e.g., line 147)
5. Threshold logic: only shows collapse controls when items > 2

## Technical Specifications

### Expanded Store (line 26-32)
```typescript
const [expanded, setExpanded] = createStore({
mcp: true,
diff: true,
todo: true,
lsp: true,
subagents: true,
context: true, // NEW: Add context to expanded store
})
```

### Context Section - Current (lines 118-125)
```tsx
<box>
<text fg={theme.text}>
<b>Context</b>
</text>
<text fg={theme.textMuted}>{context()?.tokens ?? 0} tokens</text>
<text fg={theme.textMuted}>{context()?.percentage ?? 0}% used</text>
<text fg={theme.textMuted}>{cost()} spent</text>
</box>
```

### Collapsible Section Template (based on MCP pattern)
```tsx
<box>
<box
flexDirection="row"
gap={1}
onMouseDown={() => setExpanded("context", !expanded.context)}
>
<text fg={theme.text}>{expanded.context ? "▼" : "▶"}</text>
<text fg={theme.text}>
<b>Context</b>
<Show when={!expanded.context}>
<span style={{ fg: theme.textMuted }}>
{" "}({context()?.tokens ?? 0} tokens)
</span>
</Show>
</text>
</box>
<Show when={expanded.context}>
<text fg={theme.textMuted}>{context()?.tokens ?? 0} tokens</text>
<text fg={theme.textMuted}>{context()?.percentage ?? 0}% used</text>
<text fg={theme.textMuted}>{cost()} spent</text>
</Show>
</box>
```

## Implementation Tasks

### Phase 1: Add Context to Collapsible State
- [x] Add `context: true` to the `expanded` store initialization (line 31)

### Phase 2: Make Context Section Collapsible
- [x] Wrap Context header in a clickable `<box>` with `onMouseDown` handler
- [x] Add `▼`/`▶` indicator based on `expanded.context` state
- [x] Add collapsed summary showing token count in header
- [x] Wrap content in `<Show when={expanded.context}>` conditional

### Phase 3: Reorder Sections
Move sections in JSX to match desired order:
- [x] Keep Session title first (lines 110-117)
- [x] Keep Context section second (lines 118-125) - now collapsible
- [x] Move Subagents section (lines 230-309) to third position
- [x] Keep MCP section fourth (lines 126-186)
- [x] Keep LSP section fifth (lines 187-228)
- [x] Move Modified Files section to last (lines 329-372)

### Phase 4: Handle Todo Section
- [x] **Decision:** Todo section removed per user requirements (only Context, Subagents, MCP, LSP, Changed Files specified)

### Phase 5: Verify Collapsible Behavior Consistency
- [x] Ensure all sections use same collapsible pattern
- [x] Context: Always show collapse control (no threshold, always has data)
- [x] All sections: Removed threshold logic for showing arrows - all sections now always show ▼/▶

### Phase 6: Testing
- [x] TypeScript compilation passes
- [ ] Test collapse/expand for Context section (manual verification needed)
- [ ] Verify section order displays correctly (manual verification needed)
- [ ] Test click handlers work for all sections (manual verification needed)
- [ ] Verify collapsed state summary displays correctly (manual verification needed)
- [ ] Test with empty sessions (no subagents, no MCP, etc.) (manual verification needed)

## Code References

### Internal Files
| File | Description |
|------|-------------|
| `packages/opencode/src/cli/cmd/tui/routes/session/sidebar.tsx` | Main sidebar component (426 lines) |
| `packages/opencode/src/cli/cmd/tui/context/theme.tsx` | Theme context for styling |
| `packages/opencode/src/cli/cmd/tui/ui/toast.tsx` | Toast notifications |

### Key Line References (UPDATED after implementation)
| Line(s) | Description |
|---------|-------------|
| 26-33 | `expanded` store initialization (now includes `context`) |
| 110-117 | Session title section |
| 119-135 | Context section (now collapsible) |
| 137-214 | Subagents section (moved up) |
| 216-271 | MCP section |
| 273-313 | LSP section |
| 315-356 | Changed Files section (renamed from Modified Files) |

## Validation Criteria

### Functional Requirements
- [x] Context section collapses/expands on click
- [x] Collapsed Context shows token count in header
- [x] All sections appear in correct order: Context, Subagents, MCP, LSP, Changed Files
- [x] All collapsible sections show `▼` when expanded, `▶` when collapsed
- [x] State persists during session (store-based)

### Visual Requirements
- [x] Collapse indicators align consistently across all sections
- [x] Collapsed headers show relevant summary info
- [ ] No layout shifts when toggling sections (manual verification needed)

### Edge Cases
- [x] Empty subagents list doesn't show Subagents section (kept existing `<Show when={...}>` logic)
- [x] No MCP servers connected doesn't show MCP section (kept existing `<Show when={...}>` logic)
- [x] Zero tokens shows "0 tokens" correctly

## Implementation Summary

### Changes Made:
1. Added `context: true` to the expanded store
2. Made Context section fully collapsible with click handler and ▼/▶ indicator
3. Reordered sections to: Context → Subagents → MCP → LSP → Changed Files
4. Removed Todo section (not in user requirements)
5. Renamed "Modified Files" to "Changed Files"
6. Made all sections consistently collapsible (removed threshold logic for showing arrows)
7. Added collapsed state summaries:
- Context: shows token count
- Subagents: shows number of agent types
- MCP: shows active count and error count
- LSP: shows active count
- Changed Files: shows file count

## Dependencies

None - this is a self-contained UI change with no external dependencies.

## Rollback Plan

If issues arise, revert the single file change:
```bash
git checkout HEAD -- packages/opencode/src/cli/cmd/tui/routes/session/sidebar.tsx
```
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ you can switch between these using the `Tab` key.
- Asks permission before running bash commands
- Ideal for exploring unfamiliar codebases or planning changes

Also, included is a **general** subagent for complex searches and multi-step tasks.
Also, included is a **general** subagent for complex searches and multistep tasks.
This is used internally and can be invoked using `@general` in messages.

Learn more about [agents](https://opencode.ai/docs/agents).
Expand Down Expand Up @@ -233,7 +233,7 @@ If you are working on a project that's related to OpenCode and is using "opencod

### FAQ

#### How is this different than Claude Code?
#### How is this different from Claude Code?

It's very similar to Claude Code in terms of capability. Here are the key differences:

Expand Down
2 changes: 2 additions & 0 deletions STATS.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,5 @@
| 2025-12-23 | 1,286,548 (+24,026) | 1,186,439 (+17,318) | 2,472,987 (+41,344) |
| 2025-12-24 | 1,309,323 (+22,775) | 1,203,767 (+17,328) | 2,513,090 (+40,103) |
| 2025-12-25 | 1,333,032 (+23,709) | 1,217,283 (+13,516) | 2,550,315 (+37,225) |
| 2025-12-26 | 1,352,411 (+19,379) | 1,227,615 (+10,332) | 2,580,026 (+29,711) |
| 2025-12-27 | 1,371,771 (+19,360) | 1,238,236 (+10,621) | 2,610,007 (+29,981) |
Loading