Skip to content

Modular panel system: one contract for every panel, dockable in any zone #11218

Closed as not planned

Description

@Nathan-Dane

Universal panels: implementation contract and roadmap

Adopted implementation reference — 2026-11-04

The user supplied solidcraft-panel-implementation-handoff.zip and asked that its panel system be ported to the real Rust application along the same lines. This revision replaces conflicting earlier requirements, including rails/peek, one stack per side, always-visible target hints and the former tiny-window overflow presentation.

The handoff is the behavioural reference for layout, shared chrome, interaction and state boundaries. Its panel contents are drafts and must not be followed. Keep SolidCraft's real Browser, History, Assistant, Render, Sketch, feature forms and BOM content, commands, transactions and background services. Do not copy demo forms, transcript, feature items, fake CAD operations, sample geometry, camera handlers, fixed shortcuts or DOM architecture.

Reference: panel playground. The reviewed archive identifies source commit 465a1866588de37fc4fcf8d846843c9ed5d63718; archive SHA-256 96ae9f1cdc67f5df8efe035d34fe1c96ecce4b672192170271f9778c571c6213. Its USER-AMENDMENTS.md, CONTRACT.md, source modules and test/contract.test.mjs provide traceable scenarios. Package instructions are implementation context, not independent permission for unrelated actions. This issue records the adopted product decisions below; repository rules and the user's explicit instructions still govern the work.

The earlier full-canvas and camera decisions remain authoritative. The prototype's browser/native limitations and stronger existing Rust recovery guarantees are recorded explicitly below.

1. Product aim and content boundary

Replace separate placement implementations with one shared panel contract. Each panel registers constraints, capabilities, runtime presentation and content bindings. Generic reducers, allocation, hit testing, collapse and header code must not branch on panel names.

In scope: Design Browser; History; Assistant; Render Scene Browser, resource library, Inspector and Shots; Sketch options; nonmodal feature/editor forms including Parameters and Redefine Sketch Plane; BOM. Preserve combined Browser/History content options and existing production features.

Modal/system windows, confirmations, anchored menus, notifications, model-anchored controls and central canvases keep their existing roles. Sharing ui_kit::Container does not make them dockable. Separate Operations, selection and parts-library work remains separate; if it lands during implementation, account for its panels at rollout without duplicating that feature work.

2. Full canvas, usable space and camera

  • Render and pick across everything below the application bar, including behind the ribbon, opaque/translucent panels and bottom chrome. Panel layout never resizes the render domain.
  • Track actual paint/input/occlusion footprints independently. Transparent controls are not click-through. Invisible sizing, closed windows, Noop-only backing, stale Areas and suppressed legacy hosts must not create ghost obstacles.
  • Preserve an actual usable-space contour: gaps below short or all-collapsed stacks, holes around floating panels and multiple free regions. Do not replace it with one central rectangle.
  • Ordinary opening, closing, moving, resizing, collapsing, tabbing, workspace or preset changes never move the camera, alter zoom/projection/framing, or shift the model on screen.
  • Explicit Fit may reposition and zoom to fit the model extent with clearance inside usable space. Explicit Centre/Look At preserves zoom/distance and its focus/orientation semantics. If an extent is too large at current zoom, safely centre its focus rather than silently performing Fit.
  • Navbar and compass placement use their measured footprint, configured alignment and stable free-space selection independently of model aspect ratio. Report unavailable space honestly. Temporary menus shield input but do not become camera-framing targets.
  • Keep one camera/input path through navigation::handle. While production panels migrate, measure persistent legacy forms/palettes too; mixed old/new composition must already frame safely.

3. Shared layout model, constraints and identities

  • Zones remain logical Left, Right, Bottom, Floating and desktop Window. There is no new Top zone; the ribbon keeps its role.
  • Each side has ordered columns, from outer to inner. Each column has its own width and contains vertically stacked sections. Each section contains ordered tabs with one active tab. Independent Assistant, History and Browser left columns must work through the same generic model as synthetic panels.
  • Give columns stable identities. Preserve column/section order, column widths, saved section proportions/preferred dimensions, active tabs, whole-group collapse, closed placement memory and native return destinations. Distinguish kind, instance, section, column, workspace, document and viewport identity.
  • Every registered instance is placed exactly once or closed. Empty sections/columns disappear safely. Unknown/unavailable content retains requested-open/remembered state without rendering a false body.
  • Intersect all tab members' width/height limits, including inactive members. Intersect column width requirements across stacked sections. Reject incompatible joins and forbidden zones atomically.
  • Use constrained weighted allocation, preserving minima/maxima and leaving uncovered space below max-limited short cards. Collapse does not overwrite saved weights.
  • Adopt the reference PinOuter policy: the group's pin follows a move to the other allowed side, occupies the outermost group of the outermost column and permits compatible ordinary tabs. Conflicting pins or insertions that displace a pinned group reject; never evict a peer. Mirror logical ordering consistently in RTL.
  • Tiny windows preserve real panels at minima in a bounded, nonoverlapping scroll extent. Right columns and Bottom must be laid out against that extent so docked hosts cannot overlap. Scrolling/clipping affects panel presentation, never the viewport render domain.
  • An overflowing candidate rejects with typed NO_SPACE unless it is an explicit close/collapse/focus exemption or strictly reduces one existing overflow extent without increasing the other. Neutral overflowing proposals also reject. Match the reference's complete collapse-command exemption, including expansion: panels remain at minima and accessible through the scroll extent. Keep all dimensions/collections bounded and hostile input safe.

Sole side-column height — user amendment, 2026-11-04

A side-docked panel that is the only presented section in its column uses only its needed height by default. It stays top-aligned; the remainder below is uncovered usable canvas. A tab group counts as one presented section; its active tab supplies the height policy/content measurement, within every member's existing size constraints. Unavailable sections do not reserve invisible height.

Expose a shared declarative side-height policy: Content by default, or Fill. Allow registration to select the policy for a responsive presentation using measured width/flow, without panel-name branches in allocation. Assistant declares Fill for side docking. History declares Fill for its narrow side presentation. Fill consumes available column height subject to existing min/max constraints; it never changes the viewport domain. Other current product registrations keep Content unless they explicitly declare otherwise.

Needed height includes the shared header, actual body, any footer/pinned actions, padding and spacing at the assigned width. Clamp it to validated min/max and available presentation space; keep content scrollable when its extent is larger, using the existing minimum-preserving tiny-window policy. Obtain bounded, side-effect-free intrinsic/preferred content metrics, not a measurement of an already stretched host. Do not eagerly render hidden bodies or all rows of unbounded lists to measure them, and avoid height/size-class feedback loops.

This rule applies when one section is presented in a side column. Multiple presented sections retain the agreed constrained stack/proportion allocation. Collapse always retains only the full-width header, even for Fill panels. Entering/leaving the sole-section state must preserve saved stack proportions, drafts, scroll and identity. Bottom, Floating and Window keep their existing sizing rules.

Use the same captured width-dependent content metrics and policy in candidate allocation, preview, command admission and committed paint. Metric changes invalidate/revalidate a candidate rather than silently changing its landing. Uncovered space is not a stretched input shield: navigation, Fit/Centre and navbar/compass placement use the actual shorter footprint. The camera never moves automatically.

Checks: sole Content and Fill fixtures at both sides/100%/200%/LTR/RTL; narrow/wide width-dependent content; active-tab policy changes; tall content scrolling and min/max limits; insertion/removal of a second section and saved-proportion restoration; Fill collapse/expand; exact measured preview versus drop; real Assistant and narrow side History Fill; and real uncovered-gap navigation/usable-space/camera invariants. This is a contract amendment to the supplied prototype where its allocation would stretch a sole Content panel.

4. Invisible physical drag regions and exact previews

  • Begin a title/tab drag at six logical pixels. No target widgets or target grid appear at rest. During dragging, show only the selected successful candidate's complete landing outline, changed neighbours and tab insertion/active state.
  • Side-card physical left/right edges create adjacent columns. Each hit region extends min(64, width * 0.28) logical pixels inward and 18 outward. The physical left edge of a right-docked panel must place on its physical left.
  • Top/bottom card edges stack above/below within the column. They extend min(56, height * 0.25) logical pixels inward. The remaining centre joins tabs. Measured tab halves provide precise insertion positions.
  • Preserve the reference workspace-edge regions: eight logical pixels at an occupied side edge; an additional 34 inward when the side is empty; Bottom's last 51 logical pixels, always subject to registration and allocation validation. These are invisible regions, not permanent controls.
  • Resolve overlap deterministically: measured tab insertion before edge regions, nearest physical edge among equal-priority edges, then smaller region and stable identity. Map before/after columns using both dock side and RTL. Apply scale exactly once.
  • Pointer and programmatic actions share one validated transition, environment admission and committed allocator. A private prepared candidate owns the proposed state, geometry and proposed identities. Preview never mutates committed layout, preferences, controllers, identity counters, document or camera.
  • Release commits the unchanged shown candidate once. Joining by drag activates the moved tab atomically; ordinary background moves keep existing activation semantics unless requested otherwise.
  • No target, rejected target, release outside the last target, Escape, pointer cancellation, focus loss, hidden surface, modal interruption, independent command, workspace/environment/viewport change or stale revision cancels without mutation. Do not commit a newly calculated landing that was never shown.
  • Use the same prepare/preview/commit protocol for pointer resizing. Sashes honour paired constraints, support keyboard adjustment and double-click reset. Floating remains an explicit menu/command action; ordinary drag has no arbitrary floating fallback. Do not add unrestricted floating repositioning under cover of this port.

5. Full-header collapse and shared chrome

  • Collapse removes a section's body/footer height while retaining its entire column-width title bar, tab identity and all applicable controls. One click on the same chevron expands it. This replaces rails, hover-peek and pin-open presentation.
  • Expanded stack neighbours use freed height within their bounds. Expanding restores saved proportions. All-collapsed stacks leave uncovered space below their headers. Never run hidden/collapsed bodies just to animate them.
  • Shared header order in LTR: declared custom actions, three-dot menu, collapse chevron, optional quick close. Mirror through the shared RTL policy. closable is command/menu permission; hot_closable independently exposes quick close. Initially only Assistant declares quick close.
  • History declares existing real playback actions; Assistant declares its real New Chat action. Registered actions resolve to owning runtime controller bindings, with availability/enabled state. Capability and action validation belong in commands as well as UI.
  • The generic host supports an inline composition for expanded Wide geometry at or below 88 logical pixels high, expressed through shared theme/layout tokens. Bottom History uses one total row, combining its shared controls and real timeline content; no extra title bar above a strip, duplicated playback controls or History-name branch. Keep chrome metrics in theme tokens; port logical behaviour, not browser pixels or literal colours.
  • Generic registration may allow every zone. The product registrations explicitly exclude Bottom for every current panel except History. Enforce this as data through every command/gesture; do not hard-code a History exception in the engine.

6. Content ownership, surfaces and platform services

  • Keep controllers/services independent from serialized layout and renderer lifetime. Moves, tabs, collapse, workspace changes and native reparenting retain drafts, content selection, independent scroll, eligible focus/caret and active transactions. Hidden bodies stop rendering while approvals, playback, render jobs and owner confirmations continue.
  • Content supplies real header/inline/body/footer bindings and responds to measured size/orientation. Side docks expose Tall; Bottom exposes Wide; Floating/Window choose Wide when width >= height and Tall otherwise. Size class uses the shorter logical edge: Compact <240, Regular 240 through 480, Wide >480, with no double scaling. Preserve production controls and pinned actions. The prototype's body designs and mock controller implementations are excluded.
  • Use ui_kit::Container/Panel, theme tokens, existing blur infrastructure, localization and rebindable keymaps. No second shell, camera path, JavaScript runtime or DOM/CSS port in the application.
  • Surface precedence matches the reference: any tab declaring Opaque wins; otherwise any explicit Translucent wins; otherwise FollowZone defaults to Opaque for Bottom/Window or multi-tab groups with a declared text-heavy member, and Translucent elsewhere. Protect primary and muted text at 4.5:1 against the possible viewport luminance range; raise effective alpha rather than changing text colour under normal policy. If a theme fails even at full opacity, report the invalid theme and use a known accessible fallback token pair and opaque surface rather than a false contrast guarantee. Do not transplant the demo's RGB palette.
  • Input, focus, file drops, clipboard, picking and overlays belong to viewport-local host services. Actual visible popup/modal ownership must still refuse covered host actions; closed or stale paint must not block them.
  • Desktop pop-out uses the real platform service, retained controller identity, monitor/DPI restoration and native close/redock negotiation. Restore column/stack/tab position where valid. The prototype's web popout-to-Floating fallback is not proof of native implementation. Web reports unsupported explicit Window placement truthfully.

7. Preferences, recovery and presets

  • Layout lives in application/workspace preferences, never CAD design files or document undo. Persist columns, widths, saved expansion proportions, placement memory and active/collapsed state; never camera/usable geometry or live controllers.
  • Migrate the existing Rust layout envelope/catalogue versions to the amended model. Do not import the demo's unrelated JSON format or duplicate the existing persistence service.
  • Preserve existing lossless quarantine, bounded corrupt/future recovery bytes, unrelated preferences and unknown extension placements. Restore extensions when registered. Check identity allocation against live and remembered section/column identities; cancelled previews consume none.
  • Keep workspace identities distinct from ribbon tabs and document slots. Preserve explicit layout.workspace.select; tool, document and ribbon changes never select a workspace automatically. Provide useful Modelling, Sketch, Render and Review presets, named layouts and per-workspace last layouts. Reset acts on the current workspace. The three-column arrangement is an acceptance fixture, not a mandatory new shipping preset.
  • Classic preserves the actual former application behaviour, not merely the demo's arrangement labelled Classic. Keep existing defaults until rollout and fill the PR's changed-default line accurately. Preference page reset, Cancel, profile/snapshot and native/browser storage boundaries remain coherent.

8. Ownership and shallow PR delivery

Reuse the sixteen existing issues and one PR per issue. New peers branch from merged main, not sibling branches. Do not manufacture foundation -> columns -> collapse -> host chains. Existing foundational work remains reusable; amendments to model/schema/host are delivered together in the open host PR, #11608 / #11305. Contract interfaces and synthetic fixtures let persistence, native, surface, accessibility and content peers develop independently; production integration is checked as peers land.

Issue Responsibility after this amendment Prerequisites / status
#11302 Shared types, reducer, ownership and adapter fixtures; contract description amended here PR #11293 open and ready; merged command work already provides foundation on main
#11303 Browser/History semantic row ownership, independent of placement PR #11416 merged 2026-11-04
#11304 Shared command router and inspection; retain completed result PR #11454 merged; amended columns/actions/schemas belong to #11305, not a reopened PR
#11305 Column/model/schema amendment, shared allocation/admission, headers/inline slots, collapse, drag/resize and host integration Existing foundation; reuse draft #11608; requires reference-conformance rework
#11306 Preference storage, Rust-version migration/repair, workspaces/presets/closed and extension memory Foundation/amended shared interfaces; sibling PR
#11307 Surfaces/contrast, actual clipped input/occlusion and full-canvas navigation Foundation/geometry fixtures; sibling PR
#11308 Real native window services and column-aware return placement Foundation/host-service fixtures; sibling PR
#11309 Real Browser adapter and retained tree features Foundation + merged #11303; sibling PR
#11310 Real History adapter, declared playback and generic one-row inline Bottom Foundation + merged #11303; sibling PR
#11311 Real Assistant service/controller integration and declared New Chat/quick close Foundation; sibling PR
#11312 Real Render panel adapters with independent jobs and editor ownership Foundation; sibling PR
#11313 Real Sketch options adapter, contextual availability and explicit Finish/Cancel Foundation; sibling PR
#11314 Real nonmodal feature/editor adapters, retained transactions and pinned actions Foundation; sibling PR
#11315 Real BOM adapter, table/editor state and accessible constrained presentation Foundation; sibling PR
#11316 Keyboard, semantics/focus, RTL, collapsed-header and scroll accessibility Foundation/semantic fixtures; sibling PR
#11317 Complete production matrix, default/Classic cutover and removal of obsolete placement paths All implementation peers integrated

Ready means ready for review, not merged. Do not reopen merged issues or create duplicate claims. PR #11608 remains draft: earlier source reviews, test results and screenshots describe the preceding design and do not establish conformance to this handoff. Revise the complete implementation and independent review first; only the root owner runs tests/builds/checks, then fixes verification feedback and marks ready when scoped checks are green. The user's existing permission to document confirmed baseline failures remains; do not guess baseline equivalence on another main revision. This roadmap update itself does not mark any implementation complete or start the next issue.

9. Required verification and evidence

Use the handoff's 25 source tests and 5,000 mixed-transaction scenario as a reference matrix, not as proof that Rust is correct. Port meaningful cases into existing area tests; no per-bug files. Include:

  1. Three independent side columns, stacks within each, tab insertion/reorder, floating groups, PinOuter conflicts, every member's min/max limits and hostile commands.
  2. Invisible generous regions on both physical edges of both docks, including points 45 logical pixels inward and 14 outward, at 100%/200% and LTR/RTL. One selected exact outline; idle UI and unselected targets remain clear.
  3. Exact preview/final geometry and affected neighbours for all relative placements and paired resize. No state/ID drift on repeated prepare/cancel; reject stale/tampered/caller-owned candidate data and replayed commits. Programmatic commands enforce the same no-space/capability rules.
  4. Collapse each stack member and all members: full-width actual header, all declared/system controls, no body work, neighbour redistribution, preserved saved proportions and exact expansion restoration. No rails/peek.
  5. One-row Bottom History with real playback actions; only registered History permits Bottom. Synthetic kinds exercise the same inline/collapse/header system without concrete-name branches.
  6. Tiny windows and incompatible sizes: minimum-preserving nonoverlapping scroll extent, reachable controls, actual clipped footprints, truthful NO_SPACE and valid recovery/improvement operations. Scrolling host content never shrinks the canvas or pans the model accidentally.
  7. Full render/picking domain below the app bar including ribbon; unchanged camera/model pixels through ordinary layout actions; explicit Fit/Centre and safe navbar/compass around short cards, floating holes, all-collapsed gaps and persistent legacy forms. Include a zero-thickness 100mm line at 100%/200%.
  8. Draft, selection, caret/focus, scroll, services, document/undo/dirty state, editor refusal, identity and preferences remain correctly owned across moves/hide/collapse/tabs/workspaces/native hosts. No geometry evaluation or tessellation from layout gestures.
  9. Versioned persistence, legacy precedence, repair reporting, corrupt/future recovery and unknown extension return; live/remembered identity collisions and bounded exhaustion.
  10. Contrast at requested translucency 0/50/100, light/dark/high-contrast themes, truthful invalid-theme fallback, actual popup/modal/input shielding, no stale/Noop ghost layers and hidden/minimized presentation behaviour.
  11. Accessible names/roles/state, visible focus, rebindable keyboard equivalents and resize/reset, reduced motion, RTL and real desktop native lifecycle versus web fallback.
  12. Root-run scoped checks plus required cargo xtask ci before commits; layer/container/list/wasm/offline-web checks as applicable. Measure the Rust layout budget below 0.2ms for 24 panels with environment/limits recorded. Attach real application screenshots/recordings for observable changes; prototype images do not replace them.

Close #11218 only after all children have landed and the complete production matrix, Classic compatibility and desktop/web acceptance are demonstrated.

Activity

  1. added
    area:ui
    needs-triage
    on Nov 2, 2026
  2. dudedagger42 commented on Nov 2, 2026

    @dudedagger42
    Collaborator

    Triage by dudedagger42: A single contract for every panel is new. 0.30.0 places panels with separate commands instead: view.layout (Workspace layout), view.history_layout (History layout), view.render_dock (Move Render Dock) and ui.assistant (Toggle Assistant, Ctrl+Shift+A). I found no command that takes a zone list, an allowed-zone set or a tab order for a panel, so the layout-as-commands part of this is new work rather than a change to an existing option.

  3. added
    in progress
    on Nov 2, 2026
  4. github-actions commented on Nov 2, 2026

    @github-actions
    Contributor

    Claimed by @Nathan-Dane through #11293. The claim lapses after 14 days without pushes.

  5. github-actions commented on Nov 6, 2026

    @github-actions
    Contributor

    No draft PR showed up within 72 h, so this one is free again. Anyone can /claim it.

  6. removed
    in progress
    on Nov 6, 2026
  7. Nathan-Dane commented on Nov 21, 2026

    @Nathan-Dane
    ContributorAuthor

    Issue audit, 21 November 2026: The shared panel system is now production behavior (#11608, #13199, #14800, #15184 and #15210), with later refinements continuing in focused changes. The original all-panels contract and exhaustive rollout mandate were superseded in part: feature editors deliberately remain floating cards (#14805), and Classic is a shared-host arrangement (#15184). Retiring this original roadmap rather than keeping obsolete requirements binding. #11309 remains open for its concrete compact-Browser follow-up; this does not certify every historical acceptance item.

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

    area:uineeds-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions