Skip to content

feat: Data & Storage section in General Settings (#378) - #204

Merged
jeonghun-jj-lee merged 1 commit into
local/amicodefrom
jj/378-data-storage-settings
Aug 14, 2026
Merged

feat: Data & Storage section in General Settings (#378)#204
jeonghun-jj-lee merged 1 commit into
local/amicodefrom
jj/378-data-storage-settings

Conversation

@jeonghun-jj-lee

Copy link
Copy Markdown
Contributor

Summary

Adds a Data & Storage section in the General tab of the settings dialog with two path fields:

  • Session database — override path for the opencode session database (OPENCODE_DB)
  • Configuration directory — override path for the opencode config directory (OPENCODE_CONFIG_DIR)

Both fields show resolved XDG defaults as placeholder text, validate on blur (absolute paths required, parent dir must exist for DB, directory must exist for config dir), and trigger a server restart on valid change. Overrides persist across sessions.

Changes

New files

  • data-storage-controller.ts — controller: queries defaults on mount, dispatches updates on blur, listens for status replies
  • data-storage.tsx — UI component: section header + 2 TextInputV2 path fields with inline error display

Modified files

  • general.tsx — renders DataStorageSection between Display and Advanced sections
  • context/settings.tsx — adds storage.{databasePath, configDir} to Settings interface + defaults + getters/setters
  • i18n/en.ts — adds i18n keys for section title, field titles, descriptions, and error messages

Companion PR

Extension-side handlers (bridge, allowlists, env injection): harmoniqs/amicode#380

Closes harmoniqs/amicode#378

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jeonghun-jj-lee, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 5 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a2858405-6f6a-4a6f-bdb1-c8107e1844bf

📥 Commits

Reviewing files that changed from the base of the PR and between 7549ab0 and 50a4813.

📒 Files selected for processing (5)
  • packages/app/src/components/settings-v2/data-storage-controller.ts
  • packages/app/src/components/settings-v2/data-storage.tsx
  • packages/app/src/components/settings-v2/general.tsx
  • packages/app/src/context/settings.tsx
  • packages/app/src/i18n/en.ts

Comment @coderabbitai help to get the list of available commands.

Add a new 'Data & Storage' section in the General tab of settings:
- Session database path override (OPENCODE_DB env var)
- Configuration directory override (OPENCODE_CONFIG_DIR env var)

Both fields show resolved XDG defaults as placeholder text, validate on
blur (absolute paths, parent dir exists for DB, dir exists for config),
and trigger a server restart on valid change. Overrides persist in the
app's settings store and survive restarts.

New files:
- data-storage-controller.ts: bridge logic (query defaults, send update)
- data-storage.tsx: UI component (section + 2 path fields + validation)

Modified:
- general.tsx: render DataStorageSection between Display and Advanced
- settings.tsx: add storage.{databasePath, configDir} to Settings interface
- en.ts: add i18n keys for section/row titles, descriptions, errors
@jeonghun-jj-lee
jeonghun-jj-lee force-pushed the jj/378-data-storage-settings branch from c077da4 to 50a4813 Compare August 14, 2026 15:35
@jeonghun-jj-lee
jeonghun-jj-lee merged commit 993bf2d into local/amicode Aug 14, 2026
2 of 5 checks passed
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.

Data & Storage section in General Settings

1 participant