Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
7617f59
Allow line numbers and ranges in autocomplete (#4238)
ewired Dec 28, 2025
613813a
chore: generate
actions-user Dec 28, 2025
9d485dd
docs: add opencode-notificator to ecosystem plugins list (#6269)
panta82 Dec 28, 2025
de28faf
fix: search all recent models instead of only top 5 in TUI /models co…
rekram1-node Dec 28, 2025
7a94d7a
fix: stats command to correctly handle `--days 0` for current day sta…
processtrader Dec 28, 2025
8a2f4dd
chore: update `INVALID_DIRS` to include plural 'skills' directory (#6…
connorads Dec 28, 2025
2fe7a7f
docs: document attach command (#6254)
Nindaleth Dec 28, 2025
2c0d9a4
chore: generate
actions-user Dec 28, 2025
e35d97f
feat: add bash shell completions (#6239)
scarf005 Dec 28, 2025
7ea0d37
Thinking & tool call visibility settings for `/copy` and `/export` (#…
rektide Dec 28, 2025
953e4e9
chore(desktop): vertical tabs
adamdotdevin Dec 28, 2025
fc082a0
fix(desktop): drag file over entire body to attach
adamdotdevin Dec 28, 2025
d70e9fb
chore(desktop): cleanup
adamdotdevin Dec 28, 2025
2e972b3
fix(desktop): copy/paste in terminal
adamdotdevin Dec 28, 2025
1b5bf32
chore: permissions ux
adamdotdevin Dec 28, 2025
79c2634
tweak: inform agent if no skills are available
rekram1-node Dec 28, 2025
d6db6ff
fix: handle non-text response parts in GitHub action (#6173)
elithrar Dec 28, 2025
613494b
fix(server): remove duplicate variable declaration in session list en…
shuv1337 Dec 28, 2025
8d6ff2d
fix(app): filter archived sessions from session list in sync context
shuv1337 Dec 28, 2025
204a4c1
feat(config): add dependency install locking and caching with marker …
shuv1337 Dec 28, 2025
e1fbf1f
feat(app): redesign create project dialog with separate create and cl…
shuv1337 Dec 28, 2025
8f0671e
test: add tests for dependency install caching, project create, and s…
shuv1337 Dec 28, 2025
4a9ff94
feat(desktop): themes
adamdotdevin Dec 28, 2025
d856316
Update Nix flake.lock and hashes
actions-user Dec 28, 2025
ba3a1cf
chore: cleanup
adamdotdevin Dec 28, 2025
18c8e5f
chore: cleanup
adamdotdevin Dec 28, 2025
69a15ae
ignore: update download stats 2025-12-28
actions-user Dec 28, 2025
82a876d
chore: cleanup
adamdotdevin Dec 28, 2025
f89b83a
chore: cleanup theme stuff
adamdotdevin Dec 28, 2025
040939f
chore: cleanup theme stuff
adamdotdevin Dec 28, 2025
ddf4897
release: v1.0.205
Dec 28, 2025
81c5e7b
wip: benchmark
Dec 28, 2025
0cbbb20
chore: generate
actions-user Dec 28, 2025
2abaa46
release: v1.0.206
Dec 28, 2025
ffd20b4
chore: activate code coverage in bun test config (#6297)
didier-durand Dec 28, 2025
29d8557
doc: fix typos in various files (#6294)
didier-durand Dec 28, 2025
5bfffbe
chore: generate
actions-user Dec 28, 2025
6e8cd31
Include current working directory in local MCP transport (#6303)
dbpolito Dec 28, 2025
70fa663
docs: add opencode-notifier plugin to ecosystem (#6283)
mohak34 Dec 28, 2025
0c19b71
docs: add plugin configuration documentation (#6301)
elithrar Dec 28, 2025
f12d55b
chore: generate
actions-user Dec 28, 2025
f3febd6
wip: benchmark
Dec 28, 2025
9d61370
sync
Dec 28, 2025
a4411c2
feat(desktop): theme preview
adamdotdevin Dec 28, 2025
82e5d6d
Desktop: Sync LSP updates (#6305)
dbpolito Dec 28, 2025
e0bb96a
wip: bench
Dec 29, 2025
0156f03
chore: cleanup theme stuff
adamdotdevin Dec 29, 2025
a71c9e3
fix(desktop): edit diffs
adamdotdevin Dec 29, 2025
aafffb5
chore: cleanup
adamdotdevin Dec 29, 2025
76880dc
release: v1.0.207
Dec 29, 2025
244a9fe
chore: remove debug console.log from dialog context
shuv1337 Dec 29, 2025
c822085
feat(app): add server URL management utilities
shuv1337 Dec 29, 2025
d0a23f4
feat(app): add custom server URL settings dialog
shuv1337 Dec 29, 2025
6fbcb50
refactor(app): improve create project dialog directory picker
shuv1337 Dec 29, 2025
7e1fc02
docs: add plan for custom server URL settings feature
shuv1337 Dec 29, 2025
9c62baa
docs: add plan for issues 210, 211, 212
shuv1337 Dec 29, 2025
9a4fe0f
sync: merge upstream v1.0.207 into integration
shuv1337 Dec 29, 2025
ab8b086
sync: record last synced tag v1.0.207
shuv1337 Dec 29, 2025
b1c4951
feat: clear legacy opencode theme data when applying themes
shuv1337 Dec 29, 2025
d2c5e1e
feat: clear legacy theme on startup and set nightowl as default
shuv1337 Dec 29, 2025
f5ecb5b
feat: add server URL config to error page with validation and brandin…
shuv1337 Dec 29, 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.204
v1.0.207
172 changes: 172 additions & 0 deletions CONTEXT/PLAN-210-211-212-open-issues-2025-12-28.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
# Project Plan: Resolve Open Issues 210, 211, 212 (2025-12-28)

## Scope Overview
This plan addresses three open issues in Latitudes-Dev/shuvcode:
- #210: Local dev mode skips installing .opencode tool dependencies
- #211: Add directory picker + name field to Create New project flow
- #212: Archived sessions reappear due to client-side filtering gaps and unused pipe() result

## Context & Decisions Captured
### Issue 210: .opencode tool dependencies not installed in local dev
- Root cause: `installDependencies()` in `packages/opencode/src/config/config.ts` returns early when `Installation.isLocal()` is true, so `@opencode-ai/plugin` is not installed for `.opencode/tool` in `bun dev`.
- Production builds do install dependencies; local dev skips them, causing import errors in tool registry loading.
- Acceptance criteria from issue:
- Custom tools in `.opencode/tool/` load without errors when running `bun dev`.
- Fix must not break production builds.
- Dependencies should install for local dev without conflicting with global config.
- Backward compatible with existing `.opencode` configs.
- Options explicitly discussed in issue:
- A) Remove local early return (simple; may cause repeated installs).
- B) Add docs/setup script (manual, not automatic).
- C) Bundle dependencies during local dev (extend plugin bundling pattern).
- D) Install on first tool load failure and retry.
- Decision: Align with upstream by implementing Option A (remove local early return) with a per-directory, concurrency-safe guard to avoid repeated installs while keeping behavior consistent.
- Guard definition (required):
- Use a deterministic marker file in each config dir (e.g., `.opencode/.deps-installed.json`) storing the installed version and timestamp.
- Skip install when marker matches the expected version (`Installation.BASE_VERSION` for non-local, `latest` for local).
- Serialize installs per directory to avoid concurrent `bun add` calls.

### Issue 211: Add directory picker + name field to Create New flow
- Current UI in `packages/app/src/components/dialog-create-project.tsx` has two tabs: Add Existing and Create New. Create New uses a single absolute path field and optional repo URL.
- Desired behavior:
- Three distinct flows: Add Existing, Create New, Git Clone.
- Create New: pick parent directory + enter project name; show resolved path with validation; creates new folder.
- Git Clone: repo URL + target folder picker; derive folder name from repo if blank; optional degit.
- Add Existing stays unchanged.
- API integration: `project.create` endpoint in `packages/opencode/src/server/project.ts` and `packages/opencode/src/project/project.ts` accepts `path`, optional `repo`, optional `degit`, optional `name`.
- Critical semantic clarification:
- The server does NOT build the directory path from `name`; it only uses `path` to create folders.
- The client must construct the absolute `path` (parent + folder name) before calling `project.create`.
- The `name` field is metadata only (display name) and must not be relied on for path composition.
- Platform constraints:
- `openDirectoryPickerDialog` is Tauri-only; web must use manual path input.
- The UI must gate picker usage on availability and keep a text input fallback.

### Issue 212: Archived sessions reappear
- Root causes:
- Client-side: `packages/app/src/context/sync.tsx` lacks archived filtering during initial session load and pagination fetch.
- Server-side: `packages/opencode/src/server/server.ts` calls `pipe(...)` but discards its result, returning unfiltered sessions.
- Upstream works due to `global-sync.tsx` filtering; fork uses `sync.tsx` without filtering.
- Acceptance criteria:
- Filter archived sessions in `sync.tsx` initial load and fetch.
- Fix server endpoint to return filtered sessions.
- Avoid duplicated listing and preserve intended sort order.

## Code References (Internal)
- Issue 210:
- `packages/opencode/src/config/config.ts`
- `packages/opencode/src/tool/registry.ts`
- `packages/opencode/src/plugin/index.ts`
- `packages/opencode/src/installation/index.ts`
- Issue 211:
- `packages/app/src/components/dialog-create-project.tsx`
- `packages/opencode/src/server/project.ts`
- `packages/opencode/src/project/project.ts`
- `packages/app/src/context/platform.tsx` (for `openDirectoryPickerDialog` usage)
- Issue 212:
- `packages/app/src/context/sync.tsx`
- `packages/opencode/src/server/server.ts`
- `packages/app/src/context/global-sync.tsx` (existing filtering behavior)

## External References (Git URLs)
- Directory picker usage example (React/Web File System Access API):
- https://github.com/dinoosauro/easy-backup/blob/a20006f442103b52521419255fe20331760b6d2e/src/App.tsx
- Cross-runtime directory picker abstraction:
- https://github.com/ayonli/jsext/blob/ccf374f99a190ad497b5cec974ea20badbe1c8de/dialog/file.ts

## Technical Specifications
### API Endpoints
- `GET /project/browse` (browse directories)
- `POST /project` (`project.create`)
- `GET /session` (`session.list`)

### Data Models
- `Project.Create` request fields (from `Project.create.schema`):
- `path: string` (absolute, required, client-composed from parent + folder name)
- `name?: string` (display name only)
- `repo?: string`
- `degit?: boolean`
- `Project.CreateResult`:
- `project: Project.Info`
- `created: boolean`
- `Session.Info` includes `time.archived?: number` (used for filtering)

### Configuration & Flags
| Item | Location | Purpose | Notes |
| --- | --- | --- | --- |
| `Installation.isLocal()` | `packages/opencode/src/installation/index.ts` | Detect local dev channel | `OPENCODE_CHANNEL === "local"` |
| `installDependencies()` | `packages/opencode/src/config/config.ts` | Adds `@opencode-ai/plugin` | Needs per-dir guard and concurrency control |

## Milestones & Implementation Order
### Milestone 1: Fix archived session filtering (Issue 212)
- Rationale: Small, isolated change with clear acceptance criteria; reduces user-facing bug quickly.

### Milestone 2: Update Add Project modal flows (Issue 211)
- Rationale: Larger UI change with dependencies on picker behavior and validation; benefits from stable session list behavior.

### Milestone 3: Fix local tool dependency install (Issue 210)
- Rationale: Dev workflow improvement; can be implemented after UI work without impacting feature logic.

## Detailed Task Breakdown
### Issue 212: Archived sessions filtering
- [x] Add `.filter((s) => !s.time.archived)` to initial session load in `packages/app/src/context/sync.tsx`.
- [x] Add `.filter((s) => !s.time.archived)` to `fetch` in `packages/app/src/context/sync.tsx`.
- [x] Fix server-side filtering to return filtered sessions by assigning `pipe(...)` result to `sessions` in `packages/opencode/src/server/server.ts`.
- [x] Remove duplicate `Session.list()` call and preserve intended sort order (use the filtered list).
- [x] Add/adjust tests in `packages/opencode/test/` to ensure archived sessions are excluded from list responses.
- [x] Validate UI list no longer shows archived sessions when reloading or paginating.

### Issue 211: Add Project modal flows
- [x] Expand tab model to three states: `existing`, `create`, `clone` in `packages/app/src/components/dialog-create-project.tsx`.
- [x] Extract shared path preview/validation helper for Create New + Git Clone where feasible.
- [x] Create New flow:
- [x] Add parent directory picker using `platform.openDirectoryPickerDialog` when available; otherwise use text input.
- [x] Add required project name input.
- [x] Compute and display resolved path (`parentDir + projectName`) on the client.
- [x] Validate name/path (non-empty; no path separators; no traversal; resolved path absolute) and show inline errors.
- [x] Git Clone flow:
- [x] Add repo URL input.
- [x] Add parent directory picker with fallback text input.
- [x] Add optional project name; derive from repo URL when empty (no path separators).
- [x] Add optional degit toggle.
- [x] Show resolved target path before submission.
- [x] Wire Create New and Git Clone to `globalSDK.client.project.create({ path, repo?, degit?, name? })`.
- `path` must be fully composed on the client; `name` is display-only metadata.
- [x] Ensure Add Existing flow behavior remains unchanged.
- [x] Add/adjust tests in `packages/opencode/test/` covering `project.create` path composition and validation for create/clone scenarios.
- [x] Smoke test all three flows: Add Existing, Create New, Git Clone.

### Issue 210: Local dev tool dependency install
- [x] Modify `installDependencies()` in `packages/opencode/src/config/config.ts` to allow local install with a per-directory guard (align with upstream behavior).
- [x] Implement a deterministic marker file (e.g., `.opencode/.deps-installed.json`) storing installed version and timestamp; skip when valid.
- [x] Serialize installs per directory to avoid concurrent `bun add` when multiple config directories load in parallel.
- [x] Ensure `.opencode/tool` installs do not affect global config.
- [x] Add/adjust tests in `packages/opencode/test/` to verify tool loading works in local dev mode without manual install.
- Avoid network-dependent installs; mock or stub install paths where needed.
- [x] Update any dev docs if required (only if solution adds a manual step).

## Validation Criteria
### Functional Validation
- Issue 212:
- Archived sessions never appear in session list after load or fetch.
- Server `/session` returns filtered (and sorted) list without duplicate listing.
- Issue 211:
- Create New builds correct path from parent + name and creates directory.
- Git Clone derives folder name from repo URL when blank.
- Name input rejects path separators and traversal sequences.
- Add Existing is unchanged and still works.
- Issue 210:
- Running `bun dev` in repo loads `.opencode/tool` without import errors.
- Install guard prevents repeated installs on subsequent config loads.
- Production build behavior unaffected.

### Test Execution (Required)
- [x] Add tests for new/changed behaviors in `packages/opencode/test/`.
- [x] Run tests before committing:
- `bun test` in `packages/opencode` (preferred for targeted tests)
- or `bun turbo test` at repo root

## Open Questions / Decisions Needed
- None. Decisions locked: Issue 210 uses Option A with guard; Issue 211 composes `path` in the client and uses `name` as metadata; Issue 212 includes server-side filtering and removes duplicate listing.

(End of file)
Loading