Skip to content

fix(ui): Secrets looks empty when its inventory request fails - #199116

Merged
vyctorbrzezowski merged 1 commit into
mainfrom
fix/defensive-ui-secrets-first-read
Nov 15, 2026
Merged

vyctorbrzezowski merged 1 commit into
mainfrom
fix/defensive-ui-secrets-first-read

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: Secrets says “No secrets yet” when its first inventory request fails, contradicting the error and suggesting that saved secrets are missing.

User Impact

User impact: a failed first read shows the real error and Retry action without a false empty-state message. Confirmed empty inventories and previously accepted data remain visible where appropriate. No secret values, storage, permissions, or write behavior change.

Why This Change Was Made

The inventory owner already records whether a read succeeded. The empty state now consumes that existing fact rather than treating its initial empty array as a successful result. No new error state, recovery UI, or request is added.

Evidence

Real Control UI with synthetic mock-Gateway responses, light theme at 1280×900. The red rectangles mark the false empty-state card before and the same region after. The real error and Retry remain unchanged.

Before

Before: failed inventory read also claims that no secrets exist

After

After: only the genuine read error and Retry remain

  • Browser regression fails on the unchanged Secrets implementation from main baseline e33981dc1462f63c63c13513cf1f74ecd8726dc1 and passes after the fix. It follows pending read → failure → Retry → confirmed empty inventory.
  • Independent PR checkout: all 14 owning Settings browser tests passed (16.41 seconds). Focused Secrets view/page/store suites: 15 passed (1.60 seconds), including accepted-empty retention and connection-scoped saves. CI time is not yet available.
  • UI types, format, and diff checks passed. Focused lint has no errors and one unchanged test-fixture reactivity warning, reproduced on the baseline too.
  • History: improve(ui): use the settings empty state for raw empties #191369 introduced the explicit “No secrets yet” presentation; refactor: present Secrets reads and saves with native Solid actions #180418 owns the current async read presentation. Existing loaded stays with the inventory owner.
  • Self-review and pr-simplify complete: production net +2 lines, with no new owner, copy, or style. Independent automated review and broad PR CI are not claimed complete. Draft for human review; no merge authorization.

Requested and guided by @vyctorbrzezowski; implemented by RoboClaw.

Work sessions

Linked for team reference; these sessions aren’t public.

@clawsweeper

clawsweeper Bot commented Nov 14, 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.

@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: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. 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 Nov 14, 2026
@clawsweeper

clawsweeper Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR shows the Secrets empty-state message only after the inventory owner has accepted a successful read.

Example: The first secrets.store.list request fails with “Could not read the Secrets inventory”.

  • Before: Secrets displays the error and Retry button alongside “No secrets yet.”
  • After: Secrets displays the error and Retry button without claiming the inventory is empty.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused owner-backed fix with directly visible before/after proof, distinct regression coverage, and no actionable findings; draft status and skipped broad CI remain workflow considerations.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Directly inspected before/after screenshots show the changed Secrets renderer through real Control UI navigation with synthetic Gateway responses at 1280×900: after rejection, the false empty card disappears while the inventory error and Retry remain.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A failed first inventory request incorrectly tells users that no secrets exist.
Reason: The maintainer-authored change removes a demonstrated false claim without adding configuration, state ownership, or recovery machinery.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it fixes a verified misleading Secrets state that remains on main, with directly inspected visual evidence and no actionable introduced defects.

Priority: P2
Reviewed head: fa5a5118d34a60cec403c29ef0d058f7f577ae83

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI Secrets page presents Gateway inventory results through a plain TypeScript store owner and Solid readiness boundaries; the view renders loading, errors, accepted entries, or confirmed emptiness.

flowchart LR
  A[Secrets settings page] --> B[Secrets page owner]
  B --> C[Gateway inventory request]
  C --> D[Entries and successful read flag]
  D --> E[Solid Secrets view]
  E --> F[Rows or confirmed empty state]
  E --> G[Error and Retry]
  G --> B
Loading

Technical review

Best possible solution:

Use the existing inventory owner’s loaded flag to distinguish an unread inventory from a successfully confirmed empty one.

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

Yes: current-main source resolves a failed first read to the initial empty entries array, and the supplied before screenshot shows the resulting contradictory message; this review did not execute a reproduction.

Is this the best way to solve the issue?

The patch is the smallest complete fix: it consumes an existing owner fact at the rendering boundary while preserving loading, Retry, accepted data, and confirmed-empty presentation.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vyctor H. Brzezowski: Raw commit ebc60bf adds ui/src/pages/secrets/view.tsx:159 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ebc60bf81235; files: ui/src/pages/secrets/view.tsx)
  • Peter Steinberger: Raw commit d9e63d0 adds ui/src/pages/secrets/view.tsx:141 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d9e63d047177; files: ui/src/pages/secrets/view.tsx)

PR surface

Source +2, Tests +66. Total +68 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 9 7 +2
Tests 2 66 0 +66
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 75 7 +68

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production versus test growth Production net +2 lines; tests +66 lines Growth covers the browser failure/retry sequence and the distinct accepted-empty retention contract using existing owners and proof helpers.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: A failed inventory read misleadingly suggests saved secrets are absent, but the existing error and in-product Retry remain available.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • 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 November 14, 2026, 2:12 PM ET / 19:12 UTC.

@vyctorbrzezowski vyctorbrzezowski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the view guard, inventory-owner lifecycle, existing regression coverage and both published captures. A failed initial Secrets read now keeps the real error and Retry without asserting an empty inventory. Confirmed empty results and accepted data retain their existing behavior. This reuses the owner's loaded flag and adds no read, write, persistence, or permission change. Published failure/retry coverage and current-head CI passed; no additional source changes were needed.

@vyctorbrzezowski
vyctorbrzezowski merged commit 9b7335e into main Nov 15, 2026
163 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the fix/defensive-ui-secrets-first-read branch November 15, 2026 05:34
@vyctorbrzezowski

Copy link
Copy Markdown
Member

Merged in 9b7335e.

Reviewed the view guard, inventory-owner lifecycle, existing regression coverage and both published captures. A failed initial Secrets read now keeps the real error and Retry without asserting an empty inventory. Confirmed empty results and accepted data retain their existing behavior. This reuses the owner's loaded flag and adds no read, write, persistence, or permission change. Published failure/retry coverage and current-head CI passed; no additional source changes were needed.

Verified human coauthorship is preserved.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 16, 2026
…aw#199116)

Show the Secrets empty state only after an accepted inventory read. Preserve the actual error and retry path without changing secret values, storage, or permissions.

Co-authored-by: vyctorbrzezowski <[email protected]>
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 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: 🦞 diamond lobster Very strong PR readiness with only minor 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