Skip to content

Added Preview Pane - #23

Merged
mathewdunne merged 5 commits into
mainfrom
19-more-convenient-way-to-display-readme
Sep 15, 2026
Merged

mathewdunne merged 5 commits into
mainfrom
19-more-convenient-way-to-display-readme

Conversation

@mathewdunne

Copy link
Copy Markdown
Owner

Added a preview pane (alongside advantagescope and pathplanner in the right pane) with the ability to render READMEs, build reports, and any other .md or .html file in the project directory.

Added the ability to fully collapse any of the 3 panes, with layout settings under the user icon in the top right.

Closes #18 and #19

@mathewdunne mathewdunne self-assigned this Sep 15, 2026
@mathewdunne mathewdunne linked an issue Sep 15, 2026 that may be closed by this pull request
@mathewdunne
mathewdunne merged commit 26c5e25 into main Sep 15, 2026
1 check passed
ColeHunt added a commit to ColeHunt/scriptum that referenced this pull request Sep 19, 2026
…ane architecture

Upstream (mathewdunne/CodeRunner) added a Preview pane - reads project
Markdown/HTML reports beside the editor - bundled with a full rework of
its own tab-switcher pane system. This fork replaced that tab-switcher
with independent multi-toggle panes back in a267b27, so a literal merge
would have resurrected the tab paradigm this fork deliberately moved away
from. Ported instead: kept the actual Preview feature (backend routes,
PreviewPane component, document-discovery hook, security-isolation
tests) verbatim, and wired it into PaneVisibility.tsx/IDELayout.tsx/
Topbar.tsx as a fifth independent pane (scope/choreo/elastic/preview),
not a tab.

Dropped entirely (upstream-specific, doesn't apply here):
- SimPaneSwitcher.tsx/usePaneVisibility.ts/LayoutMenu.tsx - upstream's
  tab-switcher + collapse-menu rework. This fork's own PaneToggleRow/
  PaneVisibility.tsx already solve the same problem differently.
- deploy-files.ts and its routes/metrics - "PathPlanner (deploy files)"
  endpoints for a tool this fork removed in the Choreo migration
  (f69b50a). Confirmed zero other references before excluding it.
- better-auth dependency - only used by upstream's own main.ts, which
  this fork replaced with Legion SSO; not referenced by anything ported.
- docs/decisions/042-collapsible-workspace-panes.md - describes the
  not-adopted tab/collapse UI; would misrepresent this fork's actual
  design if kept. Also collided with this fork's own existing 042
  (Choreo integration) and 041 (Elastic Dashboard) - project-preview.md
  renumbered 041 -> 050, all cross-references updated.

Real bug found and fixed along the way: preview.ts/preview-token.ts
referenced storage.config.sessionSecret, which doesn't exist here -
upstream's version is literally their better-auth library's own secret.
Reusing this fork's ssoSecret would have been wrong (it's Legion's
externally-shared secret, and can be null in demo mode). Added a proper
dedicated previewTokenSecret to ControlConfig instead: always present
(unlike ssoSecret), sourced from PREVIEW_TOKEN_SECRET with a documented
local-dev fallback.

Also fixed: e2e specs still using getByRole("tab", ...) locators against
elements that don't exist in this fork's button-based toggle model
(would have hung/failed on .click()) - repointed to getByRole("button",
...) in workflow.spec.ts and preview-isolation.spec.ts. Trimmed
pane-layout.spec.ts's two new collapse/PathPlanner-specific tests
(untestable here - the UI they exercise doesn't exist). Found and fixed
a real duplicate data-pane="preview" attribute (both the IDELayout
wrapper and PreviewPane's own root had it, which would break Playwright
strict-mode locators) by keeping it only on the wrapper, matching how
scope/choreo/elastic already work.

Kept from upstream despite not being core to Preview: the DriverStation
`visible` prop fix (releases stuck keyboard capture when the panel is
hidden - a real bug, applies to this fork's own DS toggle too, though
left unwired pending a cleaner way to thread PaneVisibility context into
WorkspacePage's pre-render JSX construction) and a resize-handle styling
polish (unrelated, harmless, kept).

Verified: full typecheck clean across all 4 tsconfig projects, 506
control-plane tests pass, 165 web tests pass (24 files, including new
PaneVisibility/IDELayout coverage for the preview pane), biome clean.
E2E/Playwright specs adapted by static review only (not executed - no
browser harness in this environment); flagged for a real run before
relying on them.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pane management & More convenient way to display README Custom gradle scripts not running

1 participant