Skip to content

fix(dashboard): stop member access catalog refetch loop - #1024

Merged
Hydralerne merged 1 commit into
oblien:mainfrom
agammann:fix/team-grants-refetch-loop
Sep 30, 2026
Merged

Hydralerne merged 1 commit into
oblien:mainfrom
agammann:fix/team-grants-refetch-loop

Conversation

@agammann

Copy link
Copy Markdown

Summary

Keep the member access editor's catalog callback stable so loading labels does not restart the resource fetch.

Motivation

Opening a member's permissions can leave the picker in a fetch/render loop instead of loading usable settings. ResourcePicker has a fetch effect that depends on onCatalogLoaded; the editor recreated that callback after every label update. This addresses #1014.

Related issue

Closes #1014.

Changes

  • apps/dashboard: memoize onCatalogLoaded in AccessEditorModal.
  • Add a mounted-component regression test that checks the catalog is fetched once and its label is visible.

Verification

Tested from upstream 0ca13fe with this branch at e7b9179 on Windows, Bun 1.3.10, Node 24.

Before fix: focused regression failed — listResources was called 2 times (expected 1).
After fix: focused regression passed — 1/1, with Project One rendered.
Dashboard typecheck: passed (`bun run --cwd apps/dashboard lint`).
Dashboard suite: 225 files, 2,408 tests passed after temporarily normalizing LF in an unrelated checkout file; that file was restored and is not in this PR.
Prettier --check on the two touched files: passed.
git diff --check: passed.

On the default Windows checkout, one existing dashboard test compares a literal LF sequence with useDeploymentConfig.ts, which Git checked out as CRLF (2,407/2,408 pass). The repository-level bun run test still fails in @repo/adapters: 4,464 pass, 194 fail, 72 skip; one recorded error is spawn sh ENOENT on Windows. bun install --frozen-lockfile also ended with an @repo/email postinstall EPERM for @zero/server, although the dashboard dependencies and checks above ran. I did not run the full repo-writing bun format command; the touched files pass Prettier's check.

Screenshots

No full signed-in team workspace was launched for screenshots. The regression test mounts the actual editor and verifies a visible catalog label plus request count.

Checklist

  • One change per PR — one bug, with nothing unrelated bundled in
  • The diff is scoped — no unrelated formatting or lint fixes
  • A test fails without this change and passes with it
  • bun run test, relevant lint, and bun format all pass locally (repository-level Windows blockers detailed above; relevant lint and scoped format check pass)
  • I understand every line of this diff and can explain it in review

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Team members page stuck in an infinite loop and failing to load

2 participants