Skip to content

fix(console): small refusal and focus fixes from the 10-19 audit - #2930

Merged
freeqaz merged 5 commits into
mainfrom
ux-fixes-129-focus
Oct 19, 2026
Merged

freeqaz merged 5 commits into
mainfrom
ux-fixes-129-focus

Conversation

@freeqaz

@freeqaz freeqaz commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Three small issues from the 10-19 bughunt of the console landings:

  • 2003: Channel Secrets shows "Configuration saved, but Secret access grants could not be confirmed..." in the danger tone. When the reader picks another Secret, the same text turns into a warning. The Configuration did save, so this is a warning, which the code's own comment says and which matches the authentication source's equivalent outcome.
  • 1998: A Plugins save whose pre-save read finds the selections changed elsewhere disables Save and shows "Reload plugin selections", but nothing takes focus. Focus drops to the page body, so a keyboard reader lands at the top of the document.
  • 2007: In a provisioning Namespace, a plan that provisions a Dedicated Agent leaves Create Agent enabled. Every step of that plan needs a ready Namespace (Secret create, credential source, provisioning), so the API always refuses it. The form already knows this and says the Namespace "must be ready first", yet it still offers the button.

Change

  • credentials.mjs: a saveErrorTone() helper. A refused save is danger. A failed grant step after the Configuration saved is a warning. The catch block and render() both use it, so the tone never flips.
  • plugins.mjs: the reload-required outcome uses the same focusSaveOutcome(save, [reload], feedback) as the unknown-outcome path. Reload plugin selections takes focus, described by "Plugin selections changed. Reload this Agent before saving again." Focus the reader moved elsewhere stays where it is (finding 1978).
  • create.mjs: while the plan provisions on a not-ready Namespace, Create Agent is disabled. It is described by the status line, which now ends "Create Agent is unavailable until then." Draft plans still save (fix(console): first-run and not-ready Namespace guidance #2867); for example, an Embedded OpenClaw draft re-enables Create. This is presentation only: the API still decides. The Namespace snapshot is the same one the start page already uses to block other not-ready states.
  • The Storybook story description for the provisioning Create form is updated to match.

Verification

Each test below fails on main and passes with the change:

  • console-agent-channels.test.mjs, "Agent credentials report partial Slack Secret grant failure (403/429/503)": the grant warning reads data-tone="warning" (main: danger).
  • console-agent-saves.test.mjs, "saving and reloading plugin selections update the Agent page in place": after a save that finds the selections changed, Reload plugin selections is focused and described by the message (main: not focused).
  • console-namespace-not-ready.test.mjs, "Create Agent names a provisioning Namespace's status before any start": the Dedicated plan shows the new line, Create Agent is disabled and described by it, and switching to an Embedded OpenClaw draft re-enables it with no description (main: times out on the new line, with Create enabled).

These full files pass locally at 4 CPUs: namespace-not-ready 7/7, agent-saves 44/44, agent-channels 15/15, create-agent-provisioning-400 40/40, agents-2 22/22, form-fields 8/8, form-fields-2 8/8, console 48/48.

Conflicts with open PRs (3-way git merge-tree against this head, compared with origin/main): there is no new conflict hunk.

UI media (Storybook, before then after):

Components/Credentials, Slack grant denied (2003): the grant warning is a warning, not danger (media commit e0973a4)

  • 1440: before before 1440 after after 1440
  • 390: before before 390 after after 390

Pages/Create Agent, Form, Namespace still provisioning (2007): Create Agent disabled, the status line says why (media commit e0973a4)

  • 1440: before before 1440 after after 1440
  • 390: before before 390 after after 390

The media was committed in e0973a4 and dropped in the next commit, so the squash carries none.

1998 is a focus move and has no Storybook state: the fixture cannot change an Agent's configurationId between the page's read and the save's preflight. The browser test covers it.

Risks

Low. These are console presentation changes only. If a Namespace becomes ready while the Create form is open, Create stays disabled until the page reloads its data (a navigation or refocus). The start page's other not-ready gates already behave this way, and the API refused this plan anyway.

- Channel Secrets: a save whose Configuration saved but whose Secret grants
  could not be confirmed is a warning from the start, not danger that turns
  into a warning when another Secret is picked (finding 2003).
- Plugins: a save that finds the selections changed focuses Reload plugin
  selections, described by the message, instead of dropping focus to the
  page (finding 1998).
- Create Agent: in a provisioning Namespace, a plan that provisions a
  Dedicated Agent disables Create Agent, described by the status line that
  now says so; every step of that plan needs a ready Namespace. Draft plans
  still save (#2867) (finding 2007).
@freeqaz
freeqaz requested a review from a team as a code owner October 19, 2026 11:10
@clawsweeper

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

…ng gate too

Internal review nit: the handler re-checks the other gates that disable Create
Agent, so it checks this one as well.
@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 priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR corrects Channel Secrets warning tone, restores focus after a plugin-save conflict, and disables Dedicated provisioning while its Namespace is not ready.

Example: A plugin save discovers selections changed in another browser.

  • Before: Save disables and keyboard focus falls to the document body.
  • After: Reload plugin selections receives focus and is described by the conflict message, unless the reader moved focus elsewhere.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The implementation is focused and source-supported, but the supplied static UI evidence does not complete the repository's required interaction proof.
Proof confidence 🦪 silver shellfish (2/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Readers receive an incorrect failure tone, lose keyboard position after a conflict, or are offered creation that the Namespace cannot yet accept.
Reason: The collaborator-authored direction addresses concrete defects with small changes and preserves the previously approved draft workflow.

Merge readiness

✅ Ready for maintainer review

Keep this useful, maintainer-authored PR open; the focused changes address current Console defects, and no introduced correctness or security bug was found.

Priority: P2
Reviewed head: f826ef80d589814b161d15659c76ea9a439d71a1

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No recording demonstrates the plugin-conflict focus transition or the changed Create control in use; the supplied screenshots establish simulated static UI states.
Agent review details

How this fits together

The OCC Console turns Namespace status and Agent API outcomes into form availability, feedback, and keyboard focus; server authorization and persistence remain unchanged.

flowchart TD
  A[Console user] --> B[Agent forms]
  C[Namespace status] --> B
  B --> D[Existing OCC API]
  D --> E[Save outcome]
  E --> F[Warning and focus handling]
Loading

Technical review

Best possible solution:

Retain these narrow repairs in the existing Console owners while preserving draft creation and deliberate user focus.

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

Current-main source exposes all three paths, and the PR describes base-failing/head-passing browser cases; no target code was run during this read-only review.

Is this the best way to solve the issue?

The patch uses existing readiness, status-tone, and focus owners and extends existing regression cases without introducing a parallel mechanism.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Free Wortley: Raw commit a1f8eaf adds apps/controller/src/console/agents/plugins.mjs:338 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a1f8eaf858f3; files: apps/controller/src/console/agents/plugins.mjs)
  • stevenlee-oai: Raw commit 4a11696 adds apps/controller/src/console/agents/create.mjs:834 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4a116967368a; files: apps/controller/src/console/agents/create.mjs)
  • kevinlin-openai: Raw commit 93fe0a8 adds apps/controller/src/console/agents/credentials.mjs:491 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 93fe0a83ec0a; files: apps/controller/src/console/agents/credentials.mjs)

Labels

Label changes:

  • add P2: The PR fixes limited Console feedback, keyboard-focus, and readiness-guidance defects without changing server behavior.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish 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: The PR fixes limited Console feedback, keyboard-focus, and readiness-guidance defects without changing server behavior.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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 19, 2026, 7:29 AM ET / 11:29 UTC.

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

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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