The ViewToolbar Disappears — And The Prop That Should

by Jule 54 views
The ViewToolbar Disappears — And The Prop That Should

The sudden invisibility of the ViewToolbar in the workspace layout is more than a cosmetic hiccup - it’s a symptom of a key prop misalignment. When activePageId is provided, the ViewToolbar should now render, but the current layout code in WorkspaceShell’s workspace layout treats it like an afterthought. The component only receives activePageId, ignoring currentUserId and other context, meaning no toolbar appears even when users are logged in.

Here is the deal: the prop chain is broken at the layout level.

  • activePageId is correctly passed from the page component, but
  • currentUserId and implicit user context aren’t forwarded
  • WorkspaceShell renders <WorkspaceShell>{children}</WorkspaceShell> without injecting necessary props

Behind the scenes, the toolbar’s visibility hinges on proper prop propagation. Without currentUserId, the system treats the shell as anonymous, blocking UI components meant to reflect user identity.

  • Toolbars depend on context, not just page ID
  • WorkspaceShell no longer automatically passes user metadata
  • This affects not just aesthetics but usability - no breadcrumb of active workspace until the toolbar loads

This isn’t just a missing component; it’s a broken signal. The PR fixes a render path, but the real fix is wiring the full prop graph. Without activePageId and currentUserId flowing through, the ViewToolbar stays hidden.

The bottom line: users deserve visibility. If a core UI element vanishes without a clear reason, it’s not just a bug - it’s a design failure. Are you building a workspace or a ghost town? The toolbar’s presence depends on proper context propagation.