Repository navigation
Description
Summary
When the project list fails to load, Settings > Governance > Policies & Limits relabels every Project budget rule as targeting a deleted project:
- the rules table shows Deleted project in the Target column for every project-scoped rule;
- editing such a rule shows the hint: "This project no longer exists, so the rule limits nothing. Choose a project or remove the rule."
Both statements are false. The project exists, and the server still enforces the rule. Following the hint leads an admin to retarget or remove a working spending cap. The project picker in the same dialog also says "No projects found".
#4505 introduced this. It is a sharper case of #4586: useProjects returns data ?? [] and exposes no error. Here the empty fallback isn't just an empty picker; it produces a deletion verdict and a destructive instruction.
Source
origin/main3bc0b32225337301082a0c1291cf6f4a287adcce.- The label and hint arrived in feat(platform): cap what a project spends with a Project budget rule #4505 (
e67180bd0). - This is a deterministic code path, read statically. No running stack was used: Review A has no stack reservation this occurrence.
In services/platform/app/features/settings/governance/components/budget-editor.tsx:
- The read (767–770):
const { projects: projectRows, isLoading: projectsLoading } = useProjects(organizationId, { includeArchived: true });.useProjects(app/features/projects/hooks/queries.ts:165–177) returnsprojects: data ?? []andisLoading, with no error or refetch. A settled failed read is therefore an empty list withisLoadingfalse. - The table (
ProjectRuleTarget, 195–212):project === undefined && !loadingrendersbudgets.projectDeleted. The comment says "one that is gone says so … except while the project list is still loading". A failed read is treated as gone. - The dialog (
projectGone, 461–467): scopeproject, a savedscopeId,!projectsLoading, and no matching project. Then the picker (578–591) showsbudgets.projectDeletedHintas its description, and itsemptyTextisbudgets.noProjectsFound. - Same class, pre-existing: the member, team and API key pickers in this editor read data without error state, so a failed read says "No users found", "No teams found" or "No API keys found". Lines 556, 571 and 604.
The same wording ships in German ("Gelöschtes Projekt"; "Dieses Projekt gibt es nicht mehr, darum begrenzt die Regel nichts. Wähle ein Projekt oder entferne die Regel.") and French ("Projet supprimé"; "Ce projet n'existe plus, la règle ne limite donc rien. Choisis un projet ou supprime la règle.").
Dedupe: I scanned 294 open items (129 PRs). Open PR #4567 changes budget-editor.tsx but adds no error handling, and leaves this logic unchanged.
Reproduction (expected from the code; not run live)
- As an admin, create a Project budget rule (feat(platform): cap what a project spends with a Project budget rule #4505) for an existing project.
- Reload Settings > Governance > Policies & Limits while
projects/queries:listProjectsfails (go offline after the policy loads, or have the backend answer with a server error). - The rule's Target reads Deleted project.
- Edit the rule. The Project field says "This project no longer exists, so the rule limits nothing. Choose a project or remove the rule.", and its picker says "No projects found".
Expected
- Failed project list: never conclude that a project is deleted. Show the rule's target as unknown or loading, say the project list couldn't load, and offer Try again. Keep the "deleted" verdict for a successful read that lacks the project.
- Pickers: separate "couldn't load" from "none found" (with
refetch). Like bug(platform): API key owner pickers say no member, team or project qualifies while the list loads or after it fails to load #4586, this needsuseProjectsto exposeisErrorandrefetch.
Regression expectation
budget-editor.test.tsx:
- with a failed
useProjectsread and a saved project rule, the Target cell is not "Deleted project" and the edit dialog has noprojectDeletedHint; - a failure message with Try again appears;
- the existing "project really deleted" case keeps its label and hint.
Triage
- Severity: low–medium. It needs a failed read, but the false hint invites removing a valid spending cap.
- Owner: the platform owner of governance budgets (feat(platform): cap what a project spends with a Project budget rule #4505).
- Review A cells:
governance.policies-limitsUX-CLARITY and REL-MANUAL. Found by Review A (TALE-358) at the 2026-10-09 04:15 Europe/Zurich occurrence. - Related: bug(platform): API key owner pickers say no member, team or project qualifies while the list loads or after it fails to load #4586 (same
useProjectsroot), Bug: Data-subject request dialog hides a failed subject-member read as “No matching members” #3857 and bug(platform): failed Products, Contacts, or Websites list reads render as empty collections #3843 (failed reads shown as empty).
Activity
fix(platform): tell a failed project read apart from a deleted project
fix(platform): tell a failed project read apart from a deleted project
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the settings pickers