Skip to content

feat(config): complete guided config surfaces#1275

Draft
Aaronontheweb wants to merge 44 commits into
netclaw-dev:devfrom
Aaronontheweb:docs/init-config-planning-alignment-ralph
Draft

feat(config): complete guided config surfaces#1275
Aaronontheweb wants to merge 44 commits into
netclaw-dev:devfrom
Aaronontheweb:docs/init-config-planning-alignment-ralph

Conversation

@Aaronontheweb
Copy link
Copy Markdown
Collaborator

Summary

  • Completes the guided config dashboard and domain pages for channels, search, security/access, exposure mode, workspaces, inbound webhooks, browser automation, skill sources, and telemetry/alerting.
  • Adds cross-boundary validation and runtime-shape preservation for config/secrets.
  • Adds OpenSpec and implementation-plan updates plus native smoke coverage.

Verification

  • dotnet build
  • dotnet test
  • ./scripts/smoke/run-smoke.sh config-ops-surfaces
  • ./scripts/smoke/run-smoke.sh light
  • dotnet slopwatch analyze
  • pwsh ./scripts/Add-FileHeaders.ps1 -Verify
  • git diff --check
  • openspec validate netclaw-config-command --type change

Supersedes #1177.

Adds three sequential OpenSpec changes for the netclaw init/config UX
overhaul planned in /home/petabridge/.claude/plans/so-a-big-ux-mossy-newt.md:

1. section-editor-abstraction — introduces ISectionEditor, registry,
   merge-on-save, single-step orchestrator mode, and refactors
   Provider/Identity/Posture to be reentrant. Lays the contract every
   future editable section must honor. Closes netclaw-dev#455.

2. netclaw-config-command — new menu-driven `netclaw config` TUI
   command composing 10 section editors (Search, 3x chat channels,
   Exposure Mode, Security Posture, Audience Profiles, Outbound +
   Inbound Webhooks, External Skills, Skill Feeds, Browser Automation),
   plus a generic ListEditor<T> framework, 4 new doctor checks, 12
   smoke tapes + audit. Closes netclaw-dev#1150.

3. simplify-netclaw-init — trims `netclaw init` to provider + identity
   + posture, adds existing-config refusal + --force backup-and-reset
   paths, post-flight nudge pointing operators at `netclaw config`.

All three validated with `openspec validate <change> --type change`.
Sequential dependencies: A enables the abstraction, B introduces the
command and editors, C cuts the long wizard. PR review can sequence
the implementation accordingly.

No production code changes in this PR; planning artifacts only.
Self-review pass on the three init/config UX changes surfaced real
issues. Fixes:

UI mockups landed in the repo (were stuck in ~/.claude/plans/):
- docs/ui/TUI-002-netclaw-config-wireframes.md (dashboard + 12
  editors + 8 page templates + doctor results + nudge)
- docs/ui/TUI-003-simplified-init-wireframes.md (3 init steps +
  post-flight + refusal + force-reset confirm)
- Each change's design.md references its corresponding wireframe
  document as the authoritative visual contract

ISectionEditor vs menu split (Change A):
- ISectionEditor gains `bool ShowInMenu` flag (default true)
- MenuRegistryAuditTests waives tape-existence check for
  ShowInMenu == false editors (e.g. Provider, Identity covered by
  init-wizard.tape and the netclaw provider CLI)
- Round-trip test + RelevantDoctorChecks contract still applies to
  every registered editor regardless of ShowInMenu

Schema/SectionId mismatches:
- Identity is NOT a top-level schema key; added to exemption list
  with category "synthetic-spans-multiple-sections" and
  ShowInMenu = false in Change A's tasks
- Top-level Security, Daemon, Tools added to exemption list in
  Change B's tasks with category "covered by another editor's
  dotted-path SectionId" naming the covering editor
- Exemption-list spec scenarios cover both top-level and
  dotted-path coverage

netclaw config show|validate reserved (Change B):
- Reserved subcommands now print an explicit "not yet implemented;
  PRD-004" notice and exit non-zero, preserving the documented
  future surface (previously rejected as unknown)

Important items tightened across the changes:
- Change B section editors explicitly REFACTOR existing init step
  viewmodels (not create duplicates) where the section already has
  an init step
- Daemon-restart nudge now specifies the PID-file + TCP probe with
  a 250 ms bound; timeout suppresses the nudge (conservative)
- In-place rename for list items now specifies originalKey/newKey
  tracking, secrets-store rekey, and array-position preservation
- BrowserAutomation schema-migration scenarios cover both the
  editor opening over a pre-existing config and doctor --fix
  auto-insert
- --force non-TTY refusal scenario added in Change C
- .bak filename collision handled via -1/-2 suffix; timestamp moves
  from unix-seconds to unix-millis
- Multi-instance editing and Test Connection partial-failure shape
  documented in Change B's design Risks section

All three changes re-validated:
  openspec validate section-editor-abstraction --type change  ✓
  openspec validate netclaw-config-command --type change      ✓
  openspec validate simplify-netclaw-init --type change       ✓
Wire Search into netclaw config so we can validate preserved-state section editing, semantic config and secrets saves, and probe-gated warnings before expanding the dashboard.
Preserve the active text input across redraws so inline edits keep their cursor position. Trim duplicate feedback so provider setup reads more cleanly.
Keep search backend setup on an explicit path from provider selection through validation and save. Preserve inactive backend settings so switching providers does not silently wipe prior configuration.
Return Esc from the saved state to the Search backend list instead of exiting the editor. Clarify the provider markers so active and configured backends are visually distinct.
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