Skip to content

bug(platform): New project drops "Who can see it" on a pending or failed team read and creates the project organization-wide #4836

Closed

Description

@yannickmonney

Problem

The New project dialog drops its Who can see it field when the team list hasn't answered, and then creates the project organization-wide without saying so. main acd5dbd10, paths under services/platform/app/features/:

  • projects/components/project-create-dialog.tsx:67 takes only teams from useOrgTeams(). The hook also returns its read state and a retry (settings/teams/hooks/queries.ts:81-95).
  • :259-270 renders the TeamMultiSelect only when assignableTeams is loaded and non-empty. While the read is pending, or after it fails, the field isn't there.
  • :143 sends teamIds only when some are selected, so the project is created organization-wide.

What a creator sees: someone who normally limits new projects to their team opens the dialog during a slow or failed team read. They don't see the audience field, submit, and get "Project created". Every member of the organization can now see the project, and nothing on screen said a choice was missing.

Expected

  • While the team read is pending, show the field in its loading state, and keep Create from submitting an audience the creator never saw.
  • On a failed read, show an inline error with Try again in place of the field. Don't treat the failure as "no teams".
  • Regression: a dialog test where listOrgTeams fails. It must not submit without either showing the field or naming the failure. On acd5dbd10 it submits organization-wide.

Severity and owner

Activity

  1. yannickmonney commented on Oct 12, 2026

    @yannickmonney
    ContributorAuthor

    Addendum (Review A, TALE-358, 2026-10-12 20:15 Zurich occurrence): the projects list ignores the same failed team reads. main c94f1fd84, services/platform/app/features/projects/components/projects-table.tsx.

    1. "Unknown team" for real teams.
      • useTeamNames() returns the directory's read state (error, retry, from settings/teams/hooks/queries.ts:41-53), but the table keeps only teams, nameOf and isLoading (:116-120).
      • After a failed directory read, every project shared with teams shows "Unknown team" in the Sharing column (TeamAudienceCell, :389-397). Nothing says the names couldn't load, and there's no Try again.
    2. A shared ?teams= link can hide every project, with no visible filter.
      • The page takes the audience filter from the URL (routes/dashboard/$id/projects/index.tsx:28, :51-60), and the table applies it unconditionally (:138-142).
      • The Teams filter control is only built when the directory has teams (:172), so after a failed directory read the filter is active but invisible, with no chip to clear it.
      • If nothing matches, the table shows its empty state: "No projects yet / Create one to share files…".
      • "My teams" (mine) behaves the same when useTeams() fails (:121-125): the viewer's team list is empty, so the filter matches no team-shared project.

    Expected:

    • Show a team-names read error with Try again instead of "Unknown team".
    • Keep any active audience filter visible and clearable, even when the directory can't load. Use a "no matches for this filter" state, not "No projects yet".

    Regression: a projects-table test with a rejected team directory and teamFilter: ['<id>']. The filter stays visible and the "No projects yet" state doesn't show. On c94f1fd84 it does.

    This is static reading, verified at the cited lines. I didn't run it.

  2. added
    agent-ready
    on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readybug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions