File tree Expand file tree Collapse file tree
apps/web/src/components/workspace Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,10 +87,13 @@ export function FileBrowser({ scope }: { scope: FileScopeParams }) {
8787 const [ editor , setEditor ] = useState < { url : string ; token : string } | null > ( null ) ;
8888 // Mirrors the listing response's own `canWrite` (an org member vs.
8989 // owner/admin) — server-decided, never inferred client-side. Defaults to
90- // `true` so the affordances don't flash-then-hide while the first load is
91- // still in flight; the very first render is also `loading`, which already
92- // hides them, so this default is never actually shown on its own.
93- const [ canWrite , setCanWrite ] = useState ( true ) ;
90+ // `false`, fail-closed: the toolbar that renders these buttons is NOT
91+ // gated by `loading` (only the entries list below it is), so a `true`
92+ // default would let a read-only member see clickable Ordner/Hochladen
93+ // buttons for one frame before the first `load()` response flips this to
94+ // its real value. `load()` sets the real value on every successful
95+ // listing; a writer sees the buttons appear a frame later, not vanish.
96+ const [ canWrite , setCanWrite ] = useState ( false ) ;
9497
9598 /**
9699 * Start the OIDC hop and record that we did. `errorResponse` maps a
You can’t perform that action at this time.
0 commit comments