Skip to content

fix(ui): separate goal callback errors from validation - #180806

Merged
steipete merged 2 commits into
mainfrom
solid2/w-s2-goal-errors
Oct 22, 2026
Merged

steipete merged 2 commits into
mainfrom
solid2/w-s2-goal-errors

Conversation

@steipete

@steipete steipete commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

A rejected goal-edit callback marks the objective invalid even when the objective itself is valid. Only expected returned validation feedback should set aria-invalid; unexpected callback failures belong in the existing Errored alert.

Keep main's completion observer, optimistic saving state, error boundary, draft/focus retention and dialog-preparation feedback. Change the rejected completion's validation projection to false, update the existing held-retry regression, and correct the matching Solid recipe example. The plain owner still decides admission and records the operation outcome.

Evidence

Check Result
Exact new-main regression Failed as expected: callback rejection incorrectly set aria-invalid; 1 failed, 5 skipped
Final goal dialog suite 6 passed; 8.12 s test command, 5.26 s Vitest duration
pnpm tsgo:ui Passed after resolving the main conflict
Lint, formatting, diff checks Passed
Independent review Passed: scoped-clean, no actionable P0–P2 findings; review limited to supplied diff, supplemented by full owner inspection
CI Current head run 39825591933 completed; sole failed catalog Retry test also fails by exact name on latest completed scheduled main run 39832966696. Native inherited-failure recovery selected; no green CI claim
Initial base/head build and strict performance eab7ec4a4d6 → 0cc9869ad08 passed; startup 315,744 → 315,745 B; CSS 41,043 B and 1 request; no violations
Final production Knip Exact merge-base/head output byte-identical: 16 unused-export and 11 unused-type entries, no changed-file findings
Visual proof Eight inspected synthetic desktop/mobile captures below: rejected callback and held retry

Main landed overlapping dialog feedback work after the earlier head passed CI. The conflict resolution preserves that implementation and its additional preparation-failure regression; the remaining production change is one boolean projection, with no imports, markup, route, lazy boundary or layout changes. The attached captures were recorded against eab7ec4a4d6 and 0cc9869ad08; they demonstrate the same valid-objective error and retained-retry states. They were not recaptured on ae6606fc18e. The final main-relative delta changes only the accessibility classification and the equivalent test callback, with no structural DOM, CSS or import changes. Current-head browser/build proof was not repeated; the six-case dialog suite and UI typecheck cover the merged implementation.

Recipe and refactor counts

Counts compare the final production module to merge input e1f4e11918cda015da76ab57b29e59a7c5455d33.

Pattern Before After
Rejected callback marks objective invalid 1 0
Expected returned validation feedback marks objective invalid 1 1
action / co-written createOptimistic(false) 1 / 1 1 / 1
createMemo / createSignal 4 / 3 4 / 3
Errored / latest 2 / 1 2 / 1
Loading / explicit on / Reveal 0 / 0 / 0 0 / 0 / 0
onSettled 2 2
isPending / Solid affects / Solid refresh / optimistic stores 0 0
Effects / render effects / untrack / onCleanup / listeners / queries / flush / owner APIs 0 0
Inline error signals / outside-hold reads 0 / 0 0 / 0

Production LOC: 326 → 326. Test LOC: 243 → 243. The old parallel error state is unnecessary because main now derives the expected validation message from the admitted completion.

before-900-error

after-900-error

before-900-retry

after-900-retry

before-470-error

after-470-error

before-470-retry

after-470-retry

Exact inherited production Knip findings
Unused exports (16)
src/agents/failover/user-copy.ts: HEARTBEAT_EXTERNAL_RUN_FAILURE_TEXT, renderHeartbeatRunFailureCopy, replaceGenericExternalRunFailureText
src/auto-reply/heartbeat.ts: DEFAULT_HEARTBEAT_EVERY, isHeartbeatContentEffectivelyEmpty, resolveHeartbeatPromptCore
src/auto-reply/reply/prompt-session-context.ts: isStoredConversationRoute
src/auto-reply/reply/queue.ts: kickFollowupDrainIfIdle
src/auto-reply/reply/queue/drain.ts: kickFollowupDrainIfIdle
src/auto-reply/reply/reply-operation-run-state.ts: resolveReplyOperationAgentTurn (replyRunState)
src/auto-reply/reply/request-native-subagent.ts: resolveCommandNativeSubagentEligibility
src/cron/plugin-command-schedule.ts: MAX_PLUGIN_COMMAND_SCHEDULE_BYTES
src/gateway/plugin-command-scheduled-run.ts: readPluginCommandScheduledJob, assertPluginCommandScheduleRegistry
src/infra/heartbeat-events.ts: resolveIndicatorType
src/infra/system-events.ts: holdSystemEventDelivery (events)
src/plugins/runtime/runtime-base.ts: COMMAND_NATIVE_SUBAGENTS_CAPABILITY, COMMAND_SCHEDULED_TURNS_CAPABILITY
src/sessions/session-controller.native-runtime.ts: waitForSessionNativeAttemptEnd
src/shared/text/assistant-visible-text.ts: stripLegacyBracketToolCallBlocks
ui/src/app/settings.ts: normalizeChatFollowUpMode
ui/src/pages/approval/approval-presentation.tsx: decisionLabel, terminalTitle, terminalDescription, renderApprovalPresentation
Unused exported types (11)
extensions/google-meet/src/meet-api.ts: GoogleMeetParticipant
extensions/msteams/src/delegated-state.ts: MSTeamsDelegatedRefreshClaim
extensions/synology-chat/src/types.ts: SynologyWebhookPathSource
extensions/twitch/src/types.ts: ChannelMessageActionAdapter
src/channels/plugins/types.public.ts: ChannelHeartbeatDeps
src/cron/scheduled-occurrence.ts: ScheduledOccurrenceRun
src/infra/heartbeat-events.ts: HeartbeatIndicatorType
src/logging/diagnostic-support-export.ts: WriteDiagnosticSupportExportResult
src/plugins/hook-types.ts: PluginHookBeforeInstallBuiltinScan
src/plugins/runtime/types-scheduled-turns.ts: PluginCommandScheduleRequest
src/status/status-plugin-health.ts: RuntimeToolQuarantineRecord

The same production command exits 1 on exact merge input e1f4e11918cda015da76ab57b29e59a7c5455d33 and final head ae6606fc18e. Logs are byte-identical; the authored production file was restored byte-for-byte after the comparison.

Current-head CI investigation

Run 39825591933 at ae6606fc18e19dc4eec7faeca8d01edca9c28fc1 failed one test in checks-ui-e2e-real-gateway (2/2):

command-palette-catalog.real-gateway.e2e.test.ts > Control UI catalog publication with a real Gateway > opens Settings pickers from publication and acquires only on Refresh or Retry.

It timed out waiting for the model-provider catalog Retry button after a failed refresh. The forced reply and following passive catalog reply both reported refreshFailed: true, with the same catalog fingerprint; all observed requests settled. The timeout artifact reports a connected Gateway, successful Settings route, and completed renderer read, but contains no catalog-boundary state or DOM snapshot. The latest completed scheduled main run 39823514819 passed this shard, so this failure is not established as inherited.

The exact named case passed locally on the current head using the canonical UI E2E runner and its private-QA runtime (1 passed, 2 skipped; 13.217 s case, 78.99 s Vitest including transformation). An initial source-swapped run reused the head bundle and is excluded from base proof. The corrected comparison built the UI with the sole runtime-changed goal file at exact merge-base e1f4e11918cda015da76ab57b29e59a7c5455d33, then passed the same case (1 passed, 2 skipped; 6.102 s case, 27.24 s Vitest). SHA-256 records verify the base bundle stayed unchanged throughout the test and the reviewed head source was restored byte-for-byte afterward. Thus the named scenario passes both base and head locally; this does not establish the isolated CI failure as inherited. No additional production change or CI rerun was made from this inconclusive evidence. The PR remains blocked on this unclassified failure.

Catalog failure narrowed

A diagnostic-only run on the independently affected provider-review PR (39831563422, #180819) reproduced the exact same named catalog Retry failure. Its public scalar capture found a mounted provider page and feedback root, but no feedback node, alert, status, button, or Retry label; Refresh remained enabled and the connected Settings route was ready. Source inspection found that main #174904 suppresses the global catalog error when a row reports unavailable or rejected discovery, while those row status labels offer no equivalent catalog retry.

The catalog recovery fix is isolated in #180897. The diagnostic itself is cross-PR evidence of the failure path, not a qualifying inherited-failure baseline for this older branch. The subsequently completed scheduled-main run below supplies the required independent exact-name evidence.

Native inherited-failure recovery

Latest completed scheduled main run 39832966696, head f113dde017ecb6dcf91af45e0bf3a4057f867d90, fails the same exact test in job 120014006792: command-palette-catalog.real-gateway.e2e.test.ts > Control UI catalog publication with a real Gateway > opens Settings pickers from publication and acquires only on Refresh or Retry. It times out after 30 seconds at line 372 waiting for the missing Retry button; 62 other cases pass. This is the qualifying matching-name baseline that the earlier local passes did not provide.

Current goal run 39825591933 has one substantive failure, that same catalog case (job 119988492907), plus its downstream CI gate. All jobs are terminal and security-fast passed independently. The inspected CI merge 52fa1d3d4f63967f60a306d4abe3b5e85ea1c35f has ordered parents df12fbcd6b2b57371d6cc4687a9a6133c6817257 and this exact head. The failing test and catalog owner source blobs are unchanged between that main parent and tested merge.

The current goal head is therefore selected for the documented native inherited-failure replacement route. This retains the failed CI result, does not claim to fix catalog recovery, and leaves the separate #180897 repair responsible for that behavior. The local base/head passes and older screenshot/build limitations above remain explicit.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T17:48:43.780376Z ae6606f New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete
steipete enabled auto-merge (squash) October 22, 2026 17:19
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Separate unexpected goal-save failures from objective validation while preserving the draft, focus, and retry controls.

Example: Saving “Review the release checklist” rejects with “Goal update unavailable. Try again.”

  • Before: The callback failure also marks the objective aria-invalid.
  • After: The error boundary shows the alert without marking the objective invalid, and retry preserves the form.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused and apparently correct, with meaningful component coverage and inspected visual evidence; integrated shipped-entry-point behavior is not demonstrated.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; four inspected screenshots exercise actual goal-dialog failure and held-retry presentation with synthetic data, while source and component assertions establish the aria-invalid distinction.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An unexpected save failure incorrectly tells assistive technology that the objective itself is invalid.
Reason: The maintainer-authored direction corrects field semantics while preserving existing validation, recovery controls, and write ownership.

Merge readiness

✅ Ready for maintainer review

This PR provides a focused correction to goal-edit error semantics that current main still needs; no actionable introduced defect was found.

Priority: P2
Reviewed head: 0cc9869ad08e78b24e413067b284f441f60931f8

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied evidence uses actual components with synthetic callbacks, and the new regression is reported passing on the repair without a corresponding base test run.
Agent review details

How this fits together

The Control UI goal dialog submits an objective through the existing chat goal owner and presents its validation result or unexpected rejection.

flowchart LR
  A[Goal edit form] --> B[Submission action]
  B --> C[Existing chat goal owner]
  C --> D[Goal write and reconciliation]
  B --> E[Returned validation message]
  B --> F[Completion error boundary]
  E --> A
  F --> A
Loading

Technical review

Best possible solution:

Keep validation strings in their existing field contract and observe unexpected rejection through the narrow completion boundary.

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

Current-main source directly shows callback rejection reaching the field-invalid state; supplied browser captures and the focused regression corroborate that path, but no target code was executed during this review.

Is this the best way to solve the issue?

The patch uses the existing dialog, submission action, and goal owner, adding only the completion observation needed to distinguish unexpected failure from returned validation.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Goal-save error semantics changes intended behavior with a stated reason (f750012: The original Goal details feature preserved drafts, visible errors, focus, duplicate admission, and retirement; its original source combined callback exceptions with returned errors.)
  • Action isolation and optimistic pending presentation keeps the original intent (24ff459: The Solid refactor deliberately isolated synchronous owner publications from held dialog transitions so navigation could retire pending dialogs.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vyctor H. Brzezowski: Raw commit f750012 adds ui/src/pages/chat/components/chat-details-goal.tsx:37 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f7500122b023; files: ui/src/pages/chat/components/chat-details-goal.tsx)

PR surface

Source +29, Tests +54. Total +83 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 53 24 +29
Tests 1 54 0 +54
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 107 24 +83

Review metrics

Metric Value Why it matters
Production versus test growth Production +29 net lines; tests +54 lines Growth implements the completion observer and narrow error slot plus one distinct rejection/retry regression, without adding another write owner.

Labels

Label changes:

  • add P2: Incorrect validation semantics affect goal-edit failure feedback, while the user can retain the draft and retry in the dialog.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Incorrect validation semantics affect goal-edit failure feedback, while the user can retain the draft and retry in the dialog.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 22, 2026, 1:25 PM ET / 17:25 UTC.

@steipete
steipete disabled auto-merge October 22, 2026 17:39
@steipete
steipete merged commit 99baae1 into main Oct 22, 2026
130 of 136 checks passed
@steipete
steipete deleted the solid2/w-s2-goal-errors branch October 22, 2026 20:09
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 23, 2026
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 ci:full Keep ordinary native-locale CI selection on the next PR run. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS 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.

1 participant