Commit Graph
29 Commits
Author SHA1 Message Date
Chris Scott 088b1d7b18 chore: update Docker config, dev-proxy, and HTML preview components 2026-06-21 17:17:33 -04:00
Chris Scott 3e617c2df8 fix: preserve prompt text on network error and allow offline typing (#276)
* fix: preserve prompt text on network error and allow offline typing

* fix: preserve prompt on network error, swallow 524 to avoid duplicate sends

* feat: add service worker precaching with app shell and runtime cache strategies

* fix: copy frontend/plugins into Docker build context

* fix: improve service worker update checks with visibility and focus handlers

* fix: add connect timeout to event stream to recover from failed connections

* fix: remove optimistic message insert, keep prompt in input until server confirms
2026-06-17 17:28:59 -04:00
Chris Scott 0b1d3b175e fix: avoid GitHub API lookup during Docker opencode install (#274) 2026-06-13 17:12:34 -04:00
Chris Scott 12b7387e11 refactor(sse): harden SSE with queue-based writer, backpressure, and directory-aware batching
- Replace promise-chaining SSE writer with queue-based pump with MAX_QUEUED_FRAMES backpressure
- Make frontend parts batcher directory-aware with (sessionID, directory) composite key
- Add session content versioning for reliable content change detection
- Add TOOLS_CACHEBUST arg for selective Docker cache invalidation
- Add docker-upgrade.sh modes (cached/tools/full)
- Fix plugin install timeout and spawn error handling
- Fix assistant session endpoint path and ordering params
2026-06-06 11:11:10 -04:00
Chris Scott 549e0ac7b2 feat: add model state persistence and improve model selection sync (#209)
* feat: add persistent model state storage with database backend

- Create opencode_model_state table for storing user model preferences
- Implement database-backed model state management (recent, favorite, variant)
- Add atomic JSON file utilities with file locking for concurrent safety
- Migrate providers routes from file-based to database storage
- Add backfill migration to preserve existing model.json data
- Include comprehensive tests for model-state and atomic-json modules
- Refactor useSessionAgent hook to simplify agent/model resolution logic
- Update getFileApiUrl to use consistent query parameter approach

* fix: include workspace dependencies in Docker image

* fix: overlay workspace node_modules after source to prevent layer overwrite

* fix: ensure model state table exists for existing databases

* feat: add model state persistence and improve model selection sync

- Add setActiveModel to modelStore and useModelSelection for direct model updates
- Sync session agent model/variant to store when messages load
- Include model, agent, and variant in optimistic user messages
- Fix useSessionAgent to check isFetching during message loading
- Update env.ts to use getter for BASE_PATH for dynamic resolution
- Fix test environment variable from OPENCODE_WORKSPACE_PATH to WORKSPACE_PATH
2026-04-29 21:44:47 -04:00
Chris Scott 9c8811dbc7 refactor: improve OpenCode server restart logic with plugin awareness
- Add plugin detection to determine if server restart is required when config changes
- Extend health check timeout to 120s when plugins are configured (from 30s)
- Implement retry-once logic for plugin installations that may cause initial startup failure
- Check agent, plugin, skills, and provider fields for restart decisions (previously only agents)
- Improve frontend toast messages to distinguish between restart and apply scenarios
- Set XDG_CACHE_HOME in Dockerfile for proper cache directory management
2026-04-24 09:18:15 -04:00
Chris Scott 18fbdaf634 Add cache and opencode directories to Docker setup 2026-04-07 23:19:51 -04:00
Chris Scott 1b4c4f2c30 Fix SQLite readonly: entrypoint must run as root to fix volume permissions
Entrypoint ran as USER node (inherited from Dockerfile) so chown
silently failed with EPERM. SQLite needs write access to the directory
to create WAL/journal files alongside the database.

- Remove USER node from Dockerfile so entrypoint runs as root
- Restore mkdir /app/data + chown for fresh volume initialization
- Entrypoint now fixes ownership then drops to node via runuser before exec
2026-04-07 23:19:51 -04:00
Chris Scott 2831533777 Fix Docker volume permissions for SQLite database
- Add runtime permission fix in docker-entrypoint.sh to ensure
  /app/data volume has correct ownership before app starts
- Remove build-time chown for /app/data from Dockerfile since
  Docker volumes are mounted at runtime, not build time
- This resolves SQLITE_READONLY error when upgrading to OpenCode 1.4.0

The database volume may have incorrect ownership when mounted by Docker,
causing the SQLite database to be read-only. The entrypoint script now
fixes permissions before starting the backend (runs as root before USER node).
2026-04-07 23:19:51 -04:00
Chris Scott 0f9caad98d Migrate memory plugin to standalone repository and remove Kasm files (#182)
Remove packages/memory from monorepo - plugin now lives at
chriswritescode-dev/opencode-memory and is installed from npm.

Update Dockerfile, docs, and workspace config to reflect the change.
Remove Dockerfile.kasm, kasm-startup.sh, and Kasm CI workflow.
2026-04-06 11:47:42 -04:00
Chris Scott 1248d0b9e0 Update memory plugin (#160) 2026-03-20 12:16:56 -04:00
Chris Scott 3461f86556 Add memory plugin with semantic search and session planning (#145)
* Add memory plugin with semantic search and session planning

* Clarify Memory Plugin is optional in docs
2026-02-23 15:08:56 -05:00
Serge the Lion 485fc67aa7 docs: update recommended NodeJS version in docs (#86) 2026-01-27 11:25:43 -05:00
Chris Scott af292758c3 chore: bump version to 0.7.4 2026-01-23 17:39:21 -05:00
Chris Scott 74608a7e2a Fix opencode install script handling for latest version 2026-01-13 11:19:11 -05:00
Chris Scott 43a456317b Fix Docker build: pass OpenCode version to installer and use correct repo 2026-01-13 00:02:30 -05:00
Chris Scott 9851ec06e0 Add version-based Docker cache invalidation for uv/opencode
Alternative approach to PR #37 - instead of busting cache on every build,
use git ls-remote to fetch latest version tags and pass them as build args.
Docker layer only rebuilds when tool versions actually change.

- Move uv install from base to runner stage alongside opencode
- Add UV_VERSION and OPENCODE_VERSION build args as cache keys
- Fetch versions via git ls-remote (no API rate limits)
- Log installed versions in build output for debugging

Ref: #37
2026-01-11 15:51:34 -05:00
Chris Scott a736e98880 Add multiple git credentials support with migration 2025-12-31 10:47:55 -05:00
Chris Scott e45ebd96a0 Add Python support with uv package manager in Docker container 2025-12-13 00:39:09 -05:00
Chris Scott 433c2da50d Add global AGENTS.md editor and expose dev server ports 5100-5103 2025-12-12 23:38:14 -05:00
Chris Scott 8d0d961e50 Rename project from opencode-webui to opencode-manager
- Update package names from opencode-webui to opencode-manager
- Update all backend import statements to use @opencode-manager/shared
- Update Docker configuration and container name
- Update README.md with new repository URLs and project title
- Update frontend assets and titles
- Update version to 0.4.0
- Update docker entrypoint script comments

This change maintains all functionality while better reflecting the
project's purpose as a comprehensive management interface for OpenCode.
2025-12-12 13:58:08 -05:00
Chris Scott cf36167fab fix(docker): Move bun to /opt for non-root user access 2025-12-03 09:43:32 -08:00
theepicsaxguy 3850723f49 Refactor Dockerfile to streamline user permissions and installation paths 2025-12-03 15:51:45 +01:00
Copilotandtheepicsaxguy d97735c956 Feat/Run Docker container as non-root user for Kubernetes PSP/PSA compatibility (#1)
* Initial plan

* Add non-root user support to Dockerfile

Co-authored-by: theepicsaxguy <39008574+theepicsaxguy@users.noreply.github.com>

* Add SECURITY.md documentation

Co-authored-by: theepicsaxguy <39008574+theepicsaxguy@users.noreply.github.com>

* Add Kubernetes example manifest, verification script, and README updates

Co-authored-by: theepicsaxguy <39008574+theepicsaxguy@users.noreply.github.com>

* Remove documentation changes (SECURITY.md, k8s-example.yaml, verify script, README updates)

Co-authored-by: theepicsaxguy <39008574+theepicsaxguy@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: theepicsaxguy <39008574+theepicsaxguy@users.noreply.github.com>
2025-12-02 23:56:19 +01:00
Chris Scott 349c130311 Fix Docker build: use pnpm workspaces and route frontend API calls through backend proxy 2025-11-25 14:17:17 -05:00
Chris Scott 18be821fdb change backend port from 5001 to 5003 2025-11-25 10:59:17 -05:00
Chris Scott ca7f976199 Add bash utilities to Docker image and fix TypeScript build errors 2025-11-25 10:46:04 -05:00
Chris Scott 0db354048d update database path from ./backend/data to ./data 2025-11-24 11:55:16 -05:00
Chris Scott bbf66c259b Initial release v0.2.5 2025-11-23 23:25:27 -05:00