Skip to content

WorkspaceShell right tool rail should support immediate render and active-icon toggle #1293

@willgriffin

Description

@willgriffin

Summary

While wiring the employment-search admin to WorkspaceShell's right-side inspectorRail/inspector slots, the local app needed consumer-side workarounds for two behaviors that should likely be first-class in the shell/layout layer:

  • Resource tool rails should be able to render immediately from route/resource metadata instead of appearing only after nested page effects publish context.
  • Clicking the currently active rail icon should be able to toggle/close the inspector without consumers depending on Svelte delegated click handlers inside a snippet rendered through the shell.

Observed downstream

In willgriffin.dev admin resource pages, the right tool rail appeared late and the active rail icon did not close the inspector reliably. The local workaround was to:

  • derive a lightweight route-level resource dock context in the admin layout so the rail exists immediately;
  • attach activation handling directly to the rail element with pointer/mouse/click/keyboard handling and a duplicate-event guard;
  • keep the existing explicit closed state so wide layouts do not immediately auto-open after the user closes the active tool.

Suggested upstream shape

Consider adding a first-class ToolsDock/right tool rail API to WorkspaceShell or the upcoming layout shell that owns:

  • active tool id and explicit closed state;
  • active-icon toggle semantics;
  • route/resource metadata fallback for immediate rail rendering;
  • robust pointer and keyboard activation for rail tools;
  • wide-screen push-content/open-by-default behavior.

That would keep consumers from hand-rolling the same state machine and event plumbing around inspectorRail.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions