Skip to content

fix: keep new Settings entries visible during autosave - #148745

Open
Patrick-Erichsen wants to merge 1 commit into
mainfrom
codex/settings-empty-entry-drafts
Open

Patrick-Erichsen wants to merge 1 commit into
mainfrom
codex/settings-empty-entry-drafts

Conversation

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

What Problem This Solves

New Talk provider, TTS persona/provider, and nested Skills entries disappear when autosave runs before the user fills them in.

User Impact

New entries remain available for editing and survive save/reload. Existing redacted-secret behavior is preserved; no configuration migration is required.

Why This Change Was Made

The shared submission sanitizer was pruning every newly empty object. It now prunes an empty container only when redaction actually removed one of its children, preserving intentionally empty entries.

Evidence

  • Four regression cases failed on the original code and pass with the fix. The focused run passes all 79 tests, including draft lifecycle, redaction, and browser map-integrity coverage.
  • Production UI build and node scripts/check-changed.mjs pass. Independent review found no actionable P0–P2 findings.
  • Real Gateway checks pass for Talk providers, TTS personas/providers, and nested Skills: Add Entry, settled autosave, editing, reload, rename, removal, and final reload. Agent configuration remains unchanged. Keys and persona labels were typed at normal pace; synthetic secret values were pasted. Existing prevention of renaming an entry containing a stored redacted secret still works.
  • Real-Gateway desktop/mobile captures below compare the same Add Entry flow after autosave on merged baseline dd52d7354262 and this change, using isolated synthetic state.
Desktop before: entry disappears Desktop after: entry remains
Desktop before: entry disappears Desktop after: entry remains
Mobile before Mobile after
Mobile before: entry disappears Mobile after: entry remains

The proof covers configuration editing and persistence, not provider authentication or speech execution. Character-by-character entry into secret fields was not certified.

@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@Patrick-Erichsen
Patrick-Erichsen marked this pull request as ready for review September 15, 2026 03:48
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Sep 15, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 15, 2026
@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed October 5, 2026, 6:29 PM ET / 22:29 UTC (Revision 2).

ClawSweeper review

What this changes

The PR preserves newly added empty Settings entries during autosave while retaining cleanup of containers emptied by secret redaction.

Merge readiness

⛔ Needs changes before merge - 1 item remains

This remains a useful, source-supported fix with convincing before/after evidence and no actionable defect in the pinned patch. Current main still prunes new empty entries, and the protected PR should remain open.

Priority: P2
Reviewed head: d82c8ccf5475ffff59f309fe0e7d05cafbcd8a18

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with strong visual and real-Gateway evidence; the pinned patch has no actionable correctness finding.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected desktop/mobile before-and-after captures and the recorded real-Gateway Add Entry, settled autosave, editing, and reload checks support the pinned sanitizer repair. Existing secret-bearing rename protection is reported preserved; no stored schema or migration contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected desktop/mobile before-and-after captures and the recorded real-Gateway Add Entry, settled autosave, editing, and reload checks support the pinned sanitizer repair. Existing secret-bearing rename protection is reported preserved; no stored schema or migration contract changes.
Evidence reviewed 8 items Verified introduced change: The pinned merge-base-to-head patch tracks whether redaction omitted a child before pruning an empty container. Sentinel handling, array positions, and existing-path preservation remain unchanged.
Current main still exposes the mechanism: Current pruneEmptyConfigValue removes an empty object whenever its key was absent from the original configuration. configFormForSubmit still invokes this cleanup, while Add Entry still inserts a schema-default object into the draft.
Submission owner changed after the PR: The current-main refactor replaced sanitizeRedactedFormForSubmit with pruneEmptyConfigForm and updated its callers. The fix must be adapted to that owner rather than restoring the retired sanitizer. The relevant patch was readable; deeper history traversal encountered unavailable promisor objects.
Findings None None.
Security None None.

How this fits together

Settings builds configuration drafts from user edits and submits them through the shared configuration capability to the Gateway. Submission cleanup determines which entries survive saving and subsequent reloads.

flowchart LR
  A[Add Entry] --> B[Settings draft]
  B --> C[Autosave submission]
  C --> D{Authored empty or redaction cleanup}
  D --> E[Preserve authored entry]
  D --> F[Remove unrestorable placeholder]
  E --> G[Gateway save and reload]
  F --> G
Loading

Before merge

  • Complete next step (P2) - Resolve the current-main conflicts by adapting the fix to pruneEmptyConfigForm, then refresh the affected regression checks and real-Gateway autosave/reload evidence.
Agent review details

Security

None.

PR surface

Source +9, Tests +67. Total +76 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 11 2 +9
Tests 2 68 1 +67
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 79 3 +76

Review metrics

None.

Technical review

Best possible solution:

Preserve intentional empty entries through the current submission owner while keeping secret handling, cancellation cleanup, and Gateway validation intact.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: Add Entry creates a new empty object, and current main's submission cleanup removes empty keys absent from the original configuration. This review did not execute a current-main reproduction.

Is this the best way to solve the issue?

Yes, distinguishing authored emptiness from cleanup is the narrow repair on the pinned base. Current main requires adapting that invariant to its replacement submission owner.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against ab2e92694e63.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This repairs a concrete Settings editing failure with a limited configuration-entry blast radius.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected desktop/mobile before-and-after captures and the recorded real-Gateway Add Entry, settled autosave, editing, and reload checks support the pinned sanitizer repair. Existing secret-bearing rename protection is reported preserved; no stored schema or migration contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected desktop/mobile before-and-after captures and the recorded real-Gateway Add Entry, settled autosave, editing, and reload checks support the pinned sanitizer repair. Existing secret-bearing rename protection is reported preserved; no stored schema or migration contract changes.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected desktop/mobile before-and-after captures and the recorded real-Gateway Add Entry, settled autosave, editing, and reload checks support the pinned sanitizer repair. Existing secret-bearing rename protection is reported preserved; no stored schema or migration contract changes.

Evidence

What I checked:

  • Verified introduced change: The pinned merge-base-to-head patch tracks whether redaction omitted a child before pruning an empty container. Sentinel handling, array positions, and existing-path preservation remain unchanged. (ui/src/lib/config-form-utils.ts:212, d82c8ccf5475)
  • Current main still exposes the mechanism: Current pruneEmptyConfigValue removes an empty object whenever its key was absent from the original configuration. configFormForSubmit still invokes this cleanup, while Add Entry still inserts a schema-default object into the draft. (ui/src/lib/config-form-utils.ts:173, ab2e92694e63)
  • Submission owner changed after the PR: The current-main refactor replaced sanitizeRedactedFormForSubmit with pruneEmptyConfigForm and updated its callers. The fix must be adapted to that owner rather than restoring the retired sanitizer. The relevant patch was readable; deeper history traversal encountered unavailable promisor objects. (ui/src/lib/config/config-draft-model.ts:316, 122967ae9f07)
  • Inspected real behavior evidence: All four prepared images were inspected. Desktop and mobile before captures show no custom entries; after captures show custom-1 and its editable provider field. The captured PR body reports real-Gateway autosave, editing, reload, rename, and removal checks using synthetic state. This supports the changed editing behavior, without claiming provider authentication or speech execution. Reviewed body source identity: e90bd01ae0f7ac317c4444b711e89f9fc59f270f5b5c1fdc645ce34c093f0a80. (d82c8ccf5475)
  • Regression coverage exercises the save boundary: The added test drives the production configuration capability through autosave, acknowledgement, later editing, and refresh using a mocked Gateway. Additional sanitizer cases distinguish authored empty siblings and explicit empty subtrees from unrestorable redacted descendants. Tests were inspected, not executed during this read-only review. (ui/src/lib/config/config-empty-entries.test.ts:9, d82c8ccf5475)
  • Related merged work leaves this defect separate: fix(ui): keep the selected agent across Settings pages #148667 merged the Settings agent selector and explicitly records disappearing empty entries as a separate pre-existing defect with this PR as its repair. The open fix: preserve saved values through unrelated settings edits #157560 addresses coercion of existing saved values, rather than establishing a replacement fix for new empty entries.

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Patrick-Erichsen: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • fuller-stack-dev: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Adapt the fix to current main's submission cleanup, then verify empty-entry autosave/reload and secret-handling regressions on the refreshed branch.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-15T03:55:04.915Z sha d82c8cc :: needs maintainer review before merge. :: none

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants