Skip to content

Summarize default commit messages in the history list - #224

Merged
Mistium merged 3 commits into
developfrom
commit-list-summaries
Nov 21, 2026
Merged

Mistium merged 3 commits into
developfrom
commit-list-summaries

Conversation

@Mistium

@Mistium Mistium commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Follows #223 (merged).

Most MistWarp commits keep the default message "Updated project", so a project's history is a list of identical rows. The history list now asks the API (MistWarp/api#81) to summarise each commit:

  • When the message is a default one ("Updated project", "Initial version", "Save project" or empty), the summary replaces it as the row title, for example "Changed 3 scripts in Apps and Window", "Changed 1 costume or sound in Sprite1" or "Only saved state changed".
  • When someone wrote a real message, it stays as the title and the summary appears quietly on the meta line.

Details

  • Loading (use-commit-summaries.js):
    • covers the first 100 rows, in batches of 50, and requests each SHA once per project;
    • drops late answers from the previous project;
    • after a failed request, those SHAs are tried again when the list next changes.
  • Silent fallback: until Add lucide icons to every context menu #81 is deployed the endpoint returns 404. The list then shows the plain messages exactly as before, with no error.
  • Sentences (commit-summary.js):
    • built from whole-sentence strings;
    • sprite names are joined with Intl.ListFormat in the community locale;
    • more than three sprites read as "in 4 sprites";
    • "1 script" and "N scripts" are separate strings. Like the rest of the community UI, languages with more plural forms get one plural.
  • Accessibility: the row link's aria-label uses the same title.
  • Layout: row height stays 52px, and the meta-line summary ellipsises at phone width.

Screenshots

These use real summaries for the public project p1790295130360345000J3JZRS, produced by the #81 Go code from its workspace.mwp and routed in with Playwright. Two rows were given written messages to show that case.

Before: every row says "Updated project".
History list before

After, Chromium, light. Default messages are replaced, and written messages keep a summary on the meta line.
History list with summaries

After, Firefox, dark.
History list with summaries in dark mode

After, phone width (390px).
History list with summaries on a phone

Checks

The node.js.yml steps were run locally, since GitHub Actions don't run here:

  • lint;
  • typecheck;
  • check-conventions --base=origin/commit-changes-view;
  • i18n:editor:check and i18n:community:check;
  • check:community-css;
  • deps:check;
  • test:unit:ci: 4094 passed;
  • build:deploy and validate-deploy.

New tests are in test/unit/community-commit-summary.test.jsx (sentences, headline choice, graph rendering) and test/unit/community-commit-summaries-hook.test.jsx (batching and the cap, project switch, retry after failure).

Preview: https://commit-list-summaries.scratch-gui.pages.dev/project/p1790295130360345000J3JZRS#history (shows plain messages until #81 is deployed).

Version: 3.7.0 (from #223) → 3.8.0, a new backwards-compatible feature.

@Mistium
Mistium force-pushed the commit-list-summaries branch from 35a6452 to 24d58fc Compare November 21, 2026 01:58
@Mistium
Mistium changed the base branch from commit-changes-view to develop November 21, 2026 01:58
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying scratch-gui with  Cloudflare Pages  Cloudflare Pages

Latest commit: 24d58fc
Status:⚡️  Build in progress...

View logs

@Mistium
Mistium merged commit fff03c9 into develop Nov 21, 2026
1 check was pending
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