Repository navigation
Description
A failed team-list request hides a project's existing audience and tells its administrator No teams yet. Create a team. Suggested severity: P2.
Reproduce locally
- Retain a project restricted to an existing team. Open its General/Audience section as an administrator with a fresh team query.
- Return a controlled 503 for
GET /api/app/teamswhile project and team-directory reads remain successful. - Let all four read attempts settle.
Expected: distinguish a failed team read from a genuinely empty organization; preserve the known audience summary and offer recovery.
Actual: the query is status=error, fetchStatus=idle, failure count 4. The row says No teams yet. Create a team, removes the Audience picker, and offers no Retry. The native project read still contains its team ID; the native team list confirms that team exists. This is misleading read-state handling, not a stored permission change.
Cause and controls
useOrgTeams in app/features/settings/teams/hooks/queries.ts exposes data/loading but discards error. ProjectSharingSection in app/features/projects/components/project-sharing-section.tsx treats missing teams plus not-loading as an empty organization. Its loading spinner does not handle the settled error state.
After removing the injected failure and explicitly refetching active queries, the same component shows the Audience picker and actual team chip; the native audience is unchanged. A separate successful picker control confirms narrowing before the native write and reads the chosen audience back. Ordinary instruction saving and typing a later draft during a held save also pass.
Distinct from #2046 (retired owning/shared-team normalization), #2088 (save model/team validation), #3717 (chat-link access state), and #3736 (folder tree visibility). Carry the team query error into this audience surface rather than displaying a creation prompt.
Local evidence and limits
Actual UI source 300bcf076ac9d629518c108c363130fcc733a6b9; local native backend 480ee6a3e6d33c3414a2c0f8a52fded1ddc4ca2d. All 18 implicated source files were compared with fetched main 1d3ebf52c8376e0fcabb6a09f96aae1e88e54a51: unchanged from the tested UI snapshot; backend files are also unchanged from the running backend snapshot.
Parent independently executed five actual-component/native HTTP observations and controls: 5 passed, exit 0. These tests assert existing defects as well as successful controls; they are not fixes. Native requests use a real local authenticated session, PostgreSQL and retained synthetic projects/team/skill. Router/session-presence and stream transport are fixture seams. The real components, query hooks, adapters, native routes and hint listener run. Ancillary model/secret reads are inert; no agent is created or run. No production testing, provider calls or browser-layout claim.
Evidence retained outside the clone: project-settings-next/parent.probe.test.tsx, parent.config.ts, parent-replay.log, parent-observations.jsonl, parent-latest-source-check.json. Run from the isolated project-settings-current-main/services/platform checkout with PROJECT_AUDIT_UI_SHA=300bcf076ac9d629518c108c363130fcc733a6b9 bun x --no-install vitest run --config /Users/yannick/.codex/notes/tale-1000-additional/project-settings-next/parent.config.ts.
Dedup: 1,070 all-state GitHub issue bodies/titles, existing 102-finding baseline, 37 additional reports and accepted repo debt. Only distinct causes count; positive controls are not additional findings.
Activity
fix(platform): keep project audience team reads truthful
docs(platform): cover audience team reads and live skill refresh
test(platform): check audience team-read notices in Chromium