Skip to content

Add setup script file picker field (codex) - #2315

Merged
numnx merged 1 commit into
feature/CODUX-139-settings-mcp-and-custom-containerfrom
task/feature-codux-139-settings-mcp-and-custom-contai-t02-codex-mr91oht3
Jul 6, 2026
Merged

Add setup script file picker field (codex)#2315
numnx merged 1 commit into
feature/CODUX-139-settings-mcp-and-custom-containerfrom
task/feature-codux-139-settings-mcp-and-custom-contai-t02-codex-mr91oht3

Conversation

@numnx

@numnx numnx commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

🧩 Task: Add setup script file picker field

Automated task PR opened by Code UX for T02.

📋 Summary

Sprint: Sprint 139 · Settings mcp and & custom container · Task: T02

Improve Settings so operators can configure HTTP MCP servers with clear guidance and choose a custom container setup script through a file-picker field.

📝 Full Task Prompt
## Objective
Make `cliWorkflow.containerSetupScriptPath` configurable through a file-picker field in Settings while keeping direct text entry available for advanced or relative paths.

## Scope
- `dashboard/src/v2/components/settings/panels/SettingsGeneralPanel.tsx`
- `dashboard/src/v2/components/settings/ProjectSettingsEditor.tsx`
- `dashboard/src/v2/lib/project-api.ts` `fetchLocalFiles` helper from T01
- Optional reusable component under `dashboard/src/v2/components/settings/` such as `LocalFilePickerField.tsx`
- `tests/dashboard/v2/settings-general-panel.test.tsx`
- `tests/dashboard/settings-page.test.tsx` or a focused new dashboard test if the older editor remains covered there
- `docs/dashboard/design-system-settings.md`

## Implementation Requirements
1. Build or extract a reusable file-picker field that combines the existing `TextInput` style with a `Browse` action, uses `fetchLocalFiles`, and shows directory navigation controls for parent/home/current typed path similar to `AddProjectModal.tsx` directory browsing.
2. Use the file picker for `cliWorkflow.containerSetupScriptPath` in `SettingsGeneralPanel.tsx`; when a file is selected, write its path through the existing immutable `update` recipe to `current.cliWorkflow.containerSetupScriptPath`.
3. Apply the same field to `ProjectSettingsEditor.tsx` for the legacy/project editor surface if that component remains rendered by tests or routes, while preserving the existing `containerImage`, cache, and Playwright browser controls.
4. Preserve manual typing for empty, relative, and absolute paths; the picker must not force a path to exist before saving because runtime still supports relative repo/root resolution.
5. Add dashboard tests that mock `fetchLocalFiles`, open the picker, navigate/select a file, verify `containerSetupScriptPath` updates, and verify an API error is announced without clearing the typed value.
6. Update `docs/dashboard/design-system-settings.md` with the file-picker accessibility contract for settings path fields.

## Constraints
- This task depends on T01 and must consume the `fetchLocalFiles` API/type contract produced there.
- Do not change settings schema, sanitizer defaults, or Docker runtime behavior.
- Do not remove manual text input or prevent relative paths such as `.code-ux/container/setup.sh`.
- Keep picker errors visible with `role="alert"` and loading/empty states visible without relying on animation.
- Avoid introducing new dependencies; use existing Preact, lucide-preact, and settings primitives.

## Verification
- Run `pnpm exec vitest run tests/dashboard/v2/settings-general-panel.test.tsx tests/dashboard/settings-page.test.tsx`.
- Run `pnpm run test:dashboard`.
- Run `pnpm run lint`.
- Success means selecting a file updates the setup script path, manual entry still works, picker failures are accessible, and existing settings tests pass.

✅ QA Review

⏳ QA review runs after this PR is opened. Check the task card in the dashboard for the outcome once it lands.

🤖 Model & Provider

Provider Codex CLI
Model gpt-5.5

⏱️ Timing

Started 2026-07-06 09:55:50 UTC
Finished 2026-07-06 10:00:47 UTC
Duration 4m 58s

📊 Token Usage

Metric Value
Input tokens 70,981
Cached input tokens 1,165,696
Output tokens 10,359
Total tokens 1,247,036
Invocations 1
Tool calls 41
Active time 4m 34s

Included usage estimate (subscription/local login): $1.25

🌿 Branch Info

Base: feature/CODUX-139-settings-mcp-and-custom-container
Head: task/feature-codux-139-settings-mcp-and-custom-contai-t02-codex-mr91oht3


🤖 Generated by Code UX

@numnx
numnx merged commit d77d233 into feature/CODUX-139-settings-mcp-and-custom-container Jul 6, 2026
4 checks passed
@numnx
numnx deleted the task/feature-codux-139-settings-mcp-and-custom-contai-t02-codex-mr91oht3 branch July 6, 2026 10:03
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.

1 participant