Add global config file editor#477
Conversation
Add an allowlisted server API for editing known global config files so settings can read and create the OpenCode global config without exposing arbitrary filesystem writes. Expose a Config Files settings section that reuses the Monaco file editor, supports save/reload with dirty-state confirmation, and keeps the selected file path visible inside the selector for compact layouts. Validate the implementation with server and UI typechecks plus a UI production build; existing Vite warnings remain unrelated.
Replace the narrow tab strip at compact widths with a full-width section selector so small screens keep navigation, context, and close controls in one toolbar. The compact toolbar hides the duplicated settings title/header, shows the settings icon, keeps the close action visible, and increases selector/dropdown text size for touch layouts. Validated with the UI typecheck and production build before committing.
|
I want you to perform the gatekeeper checks for latest PR state check for regressions |
|
Request understood: strict gatekeeper review of the latest PR state for regressions, implementation quality, and merge readiness. Assumption: this is review-only; I did not modify files. Gatekeeper verdict: changes requested. Findings:
The discard confirmation is only used for file selection changes and reload. The settings section selector, sidebar nav buttons, and close buttons bypass it, so switching to another settings section or closing the dialog discards the in-memory Monaco edits without warning. That contradicts the PR’s dirty-state handling goal and is a high-risk regression for a config editor.
This route creates directories and writes an allowlisted global config file. There should be focused coverage for the allowlist/404 behavior, missing-file read behavior, directory creation on write, and write error handling. This is a sensitive endpoint that edits files outside the workspace, so relying only on UI/manual validation is not enough. Validation attempted:
Additional note:
-- |
Prevent save completion from clearing edits made while a request is in flight by only marking the saved payload clean when the editor still matches it. Add a reusable settings dirty guard so section navigation and dialog close paths confirm before discarding unsaved config edits. Make the config-file route injectable and add focused tests for allowlisted listing, missing-file reads, directory creation on write, unknown ids, and write failures. Validated with the focused config route test, server typecheck, UI typecheck, and UI production build.
|
Check again |
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/25998702397 Artifacts expire in 7 days.
|
|
Request understood: re-check the latest PR state after the new push, with the same strict gatekeeper lens. Assumption: review-only; I did not modify files. Gatekeeper verdict: no code-level blockers found in the latest diff. What changed since the prior review:
Residual risks / follow-ups:
No new regressions found in the updated dirty-state implementation during static review. -- |
Add the OpenCode JSONC global config file to the allowlist and use the USERPROFILE .config path convention for Windows display and writes. Give the Config Files Monaco editor a compact gutter that sizes line-number space from the current line count while keeping the right-drawer editor unchanged. Validated with config-file route tests plus server and UI typechecks.
|
Check again now |
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/25999086643 Artifacts expire in 7 days.
|
|
Request understood: re-check the latest PR state after the newest push, with the same strict gatekeeper lens. Assumption: review-only; I did not modify files. Gatekeeper verdict: no code-level blockers found in the latest diff. What changed since the previous re-check:
Prior findings status:
Validation attempted again:
Residual non-blocking risk:
No new regressions found in the latest static review. -- |
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/25999445077 Artifacts expire in 7 days.
|
Summary
Validation
Notes