Skip to content

fix(console): offer Create Namespace again after Refresh - #3002

Merged
freeqaz merged 5 commits into
mainfrom
fix-1020b-nscreate
Oct 20, 2026
Merged

freeqaz merged 5 commits into
mainfrom
fix-1020b-nscreate

Conversation

@freeqaz

@freeqaz freeqaz commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

#2983 keeps a 403 on Namespace creation for the rest of the page's life: Create Namespace stays disabled and the refusal shows. Once an administrator grants Namespace create, nothing in the console offers it again. In-app navigation keeps the refusal, and so does the page's own Refresh. Only a browser reload asks again, and the page never says so; only the docs do (finding 2083). Separately, 3 of 8 mutants of the gate survived (finding 2087):

  • an unknown administrator answer
  • the refusal being bound to the account that got it
  • a refused administrator

Change

  • namespaces.mjs: the page's Refresh now clears the recorded refusal and offers Create Namespace again. In-app navigation still keeps it, so a refused reader is not invited to fail again on every page change. The refusal now says how to get out: "Your access does not include creating Namespaces in this Installation. After an administrator grants access, select Refresh to try again."
  • console.mjs: passes the load's existing fromRefresh flag into the Namespaces page context. That is one argument; no session, sign-in or IAM change.
  • docs/guides/console/create-namespace.md, the Storybook scenario description and namespace-create-workflow.md now name Refresh. docs/flows/platform-console.md's Namespace paragraph traces it: the 403 refusal holds per account across navigation until Refresh passes fromRefresh; OCC authorizes each attempt. That paragraph is rewritten word-neutrally, because the file is at 2498 of 2500 words.
  • Client only: the API still authorizes every create. There is still no advisory Installation permission read (finding 2070).

Verification

Screenshots, before | after (ns-refused: right after the 403; ns-granted-refresh: after an administrator grants create and the reader selects Refresh):

state before after
ns-refused 1440 before after
ns-refused 390 before after
ns-granted-refresh 1440 before after
ns-granted-refresh 390 before after

Storybook: Pages/Namespaces scenario namespaceCreateRefused (description updated).

Risks

Low. A refused reader can try again after Refresh; the API refuses again and the refusal returns, as before. One user-facing sentence was added.

After a 403, Create Namespace stayed disabled through in-app navigation and
the page's Refresh, even once an administrator granted Namespace create; only
a browser reload asked again, and the page never said so (finding 2083).
Refresh now clears the refusal, and the refusal says to select Refresh after
an administrator grants access. In-app navigation still keeps it. Client only.

Tests pin an unknown administrator answer (still the primary action), a
refusal bound to the account the API refused, and the grant-then-Refresh
path (finding 2087).
@freeqaz
freeqaz requested a review from a team as a code owner October 20, 2026 04:04
@clawsweeper

clawsweeper Bot commented Oct 20, 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. P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR restores Create Namespace after Refresh and explains how to retry after an administrator grants access.

Example: A reader's attempt to create Granted team is denied, then an administrator grants Namespace creation.

  • Before: Refresh leaves Create Namespace disabled; only a browser reload restores it.
  • After: Refresh restores Create Namespace, allowing a newly authorized attempt.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-supported, with useful integration coverage; supplied visual evidence does not yet satisfy the repository's UI evidence requirement.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
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 user granted Namespace creation after an earlier denial cannot restore the control with the console's Refresh action.
Reason: The maintainer-authored direction provides a visible recovery action with minimal runtime change and no new API or configuration.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it provides a focused recovery improvement absent from current main, and no introduced code defect was found.

Priority: P2
Reviewed head: 3b414cc84f937f3b7a2f5f87fd88b03e94aeb4c0

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Attach the repository-required native GitHub screenshots and a short walkthrough showing denial, Refresh after a grant, and successful creation.
Agent review details

How this fits together

The console renders Namespaces and submits creation requests to OCC, which authorizes the caller before saving the Namespace and queuing provisioning.

flowchart LR
  User[Console user] --> Refresh[Refresh action]
  Refresh --> View[Namespaces view]
  View --> API[Namespace creation API]
  API --> IAM[IAM authorization]
  IAM --> State[Namespace and provisioning work]
Loading

Technical review

Best possible solution:

Retain this small Refresh-based recovery path within the existing Namespaces renderer and server-authorized creation workflow.

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

Current-main source retains the creation refusal through Refresh, and the added browser scenario targets denial followed by a grant and Refresh; no target code was run during this read-only review.

Is this the best way to solve the issue?

The patch uses the existing Refresh signal and renderer, preserves suppression across navigation, and leaves every creation attempt subject to server authorization.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Namespace creation refusal lifetime and recovery guidance changes intended behavior with a stated reason (9ab26af: Suppress repeated creation invitations after an exact API denial while retaining creation for non-administrators who may hold a grant.)
  • Namespaces renderer context keeps the original intent (5a2cb36: Integrate Namespace creation into the console through the existing authorized and audited API.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Focused runtime repair: The introduced diff forwards the existing fromRefresh flag and clears only the in-memory creation refusal when Refresh renders Namespaces. (apps/controller/src/console/namespaces.mjs:37, 3b414cc84f93)
  • Current-main behavior and original intent: Current main retains the refusal across Refresh. The intentional suppression originated in fix(console): stop inviting members to create namespaces they cannot create #2983 to avoid repeatedly inviting denied users to create; this PR preserves suppression across navigation and explicitly explains the recovery change. (apps/controller/src/console/namespaces.mjs:33, 9ab26afcc8e2)
  • Target-native integration coverage: The added browser case uses the real console, controller, and IAM with in-memory storage: denial survives navigation, a grant is added, Refresh restores the control, and creation is verified in state. (tests/browser/console-namespace-create.test.mjs:407, 3b414cc84f93)
  • Authorization remains authoritative: OpenClawController.createNamespace authorizes create against the server-selected Installation before persisting a Namespace; the PR changes no authorization or audit path. (packages/occ/src/index.ts:4065, 3b414cc84f93)
  • Visual evidence and applicable policy: Downloaded desktop and mobile before/after screenshots visibly establish the revised refusal guidance. AGENTS.md requires native GitHub screenshots and a short interaction video; the body links Gist screenshots and contains no video. Additional grant-and-Refresh image links could not be inspected through the available GitHub API or browser tool, which is a review-side limitation. (AGENTS.md, 3b414cc84f93)
  • Prior review resolution: The previously requested flow documentation now describes account-specific suppression until Refresh. The prior screenshot-and-walkthrough recommendation remains applicable and is mandatory under the repository's UI evidence policy. (docs/flows/platform-console.md:188, 3b414cc84f93)

Likely related people:

  • Free Wortley: Raw commit 9ab26af adds apps/controller/src/console/namespaces.mjs:33 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 9ab26afcc8e2; files: apps/controller/src/console/namespaces.mjs)
  • Derek Carr: Raw commit 5a2cb36 adds apps/controller/src/console/namespaces.mjs:42 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 5a2cb363d5b2; files: apps/controller/src/console/namespaces.mjs)

Review metrics

Metric Value Why it matters
Production versus browser-test changes Production +11/-3 lines; browser tests +150/-21 lines. The runtime repair is small; added coverage protects grant recovery, an unavailable administrator probe, and account-specific refusal presentation.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦞 diamond lobster.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P2: The PR repairs a limited console recovery failure after access changes, with browser reload available as a workaround.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

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

  • Upload native GitHub screenshots and a short video demonstrating the changed recovery interaction.

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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-20T04:22:13.385Z sha efbfbb6 :: needs changes before merge. :: [P3] Document the Refresh reset in the existing console flow
  • reviewed 2026-10-20T04:48:03.193Z sha 179964e :: needs maintainer review before merge. :: none

Reviewed October 20, 2026, 12:59 AM ET / 04:59 UTC (Revision 3).

The console flow now says the 403 refusal holds per account across
navigation until the page's Refresh passes fromRefresh, and that OCC
authorizes each attempt; the Storybook walkthrough checks the Refresh
guidance. Word-neutral in platform-console.md (2498 of 2500).
@freeqaz

freeqaz commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@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. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 20, 2026
@freeqaz

freeqaz commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Oct 20, 2026
@clawsweeper clawsweeper Bot removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 20, 2026
@freeqaz
freeqaz merged commit 81c57a7 into main Oct 20, 2026
66 checks passed
@freeqaz
freeqaz deleted the fix-1020b-nscreate branch October 20, 2026 05:08
freeqaz added a commit that referenced this pull request Oct 20, 2026
#3002 grew the file from 7 to 10 tests after the sweep window. Its row is
now the slowdown-normalised median over the main run on 81c57a7 and
#3002's two branch runs: 15.6 s (was 12.3 s from the window's runs).
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: 🦐 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant