Skip to content

Add a GitHub-style developer view for projects - #226

Merged
Mistium merged 2 commits into
developfrom
developer-view
Nov 21, 2026
Merged

Mistium merged 2 commits into
developfrom
developer-view

Conversation

@Mistium

@Mistium Mistium commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Adds a developer view to project pages: a view of the project's fractch files laid out like a GitHub repository. Open it from the new Developer view button in the project header. It lives at /project/:id/code (and /p/:slug/code).

Preview: https://developer-view.scratch-gui.pages.dev/project/p1790295130360345000J3JZRS/code (the commit column fills in once MistWarp/api#82 is deployed)

What's in it

  • Code tab, like a GitHub repository page:
    • the latest commit bar, with a link to the commit count;
    • a listing that shows folders first, then files;
    • each row shows the latest commit that changed it, plus a relative time;
    • a Go to file search and a branch picker (?branch=);
    • the instructions and notes as a README;
    • an About sidebar with counts, size and contributors.
  • Folder and file pages: /code/tree/<folder> and /code/blob/<file> each have a breadcrumb and their own latest commit. Files open in the existing viewer, which is now pulled out of ProjectFiles as ProjectFileViewer. It keeps syntax highlighting for fractch and SVG, plus image and audio previews.
  • Commits, Branches, Pull requests and Releases tabs: these reuse the existing history graph, branch manager, pull list and releases. Tab URLs (/code/commits and so on) can be linked.
  • Messages: the latest-commit messages use the readable commit summaries, so "Updated project" commits read as, for example, "Changed 3 scripts in Apps and Window".
  • Data source: latest commits per path come from the new last-commits endpoint in Add last-commits inspection for per-path latest changes api#82. It ignores saves that only change saved variable values, so a folder only moves to the top when its scripts or assets change. Until that endpoint is deployed, the listing renders without the commit column.
  • Routing: the Cloudflare middleware now knows the /code routes, so they get project meta tags instead of a 404 status. The dev server now falls back to the SPA for /code/tree/ and /code/blob/ paths that end in a file extension.
  • Phone layout: the header buttons stack, the commit column hides, and file views get a fixed height. I also fixed a phone bug where the bounded file viewer collapsed to zero height, and stopped the project header's … button from stretching on phones.

Screenshots

Code tab, desktop, Chromium, dark theme:
Code tab

A folder, with breadcrumb and parent row:
Folder

A fractch file on its own page:
File

An SVG costume preview, Firefox, light theme:
SVG preview in Firefox

Commits tab (the existing graph, using the readable summaries):
Commits tab

The new header button on the project page:
Project header

Phone, Chromium dark (left) and Firefox light (right):
Phone

Project header on a phone:
Project header on a phone

Checks

  • pnpm run check passes: 4122 unit tests, including 18 new developer view tests and new middleware route tests.
  • I checked the pages against live projects in Chromium and Firefox, desktop and phone. For the screenshots, the commit column came from the new endpoint's output on the project's real workspace.
  • An independent review found nothing must-fix. I fixed its should-fix findings: the page now resets when the project id changes, the breadcrumb label is translated, the branch is kept when switching tabs, and unknown branches are dropped from links.

Version: 3.8.1 to 3.9.0 (new feature).

@Mistium
Mistium merged commit 7a62b35 into develop Nov 21, 2026
1 check passed
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.

1 participant