Skip to content

Add live status bars to the upload and publish pages - #11

Merged
sclintonowasp merged 2 commits into
mainfrom
docs-status-bar
Oct 19, 2026
Merged

sclintonowasp merged 2 commits into
mainfrom
docs-status-bar

Conversation

@sclintonowasp

Copy link
Copy Markdown
Member

Summary

  • Both upload.html and publish.html previously just told the user to check the Actions tab after submitting. Adds docs/js/workflow-status.js: a live status bar that finds the run a dispatch just created and polls its jobs/steps until it finishes, rendering a progress bar, step list, and a link to the run.
  • The core challenge: POST /dispatches (repository_dispatch) returns no run id, and the runs API never exposes a dispatch's client_payload back -- so a bar can't be told "watch run #12345" directly. It attributes its run by snapshotting the workflow's existing run ids immediately before dispatching, then polling until an id shows up that wasn't in that snapshot.
  • upload.html: one status bar per bootstrap-asset.yml submission.
  • publish.html: one status bar per publish-direct.yml dispatch (it fires one per checked asset/locale row). Each request's run is attributed before the next request's dispatch fires -- otherwise two requests started close together could both claim the same freshly-appeared run -- but polling each to completion runs concurrently in the background afterward, so submitting several rows isn't serialized end to end.
  • Names publish-direct.yml's two checkout steps (translations vs. translations-templates) -- both previously used actions/checkout's own default step name, identical for both, which would have shown as two indistinguishable "Checkout" rows in the new step list.

Test plan

  • Verified the status bar's logic (run attribution, step-by-step rendering, success/failure/timeout paths, label persistence across re-renders) against mocked listWorkflowRuns/getWorkflowRunJobs responses in a Node harness (vm + a minimal DOM stub) -- all three end states render correctly with correct colors/icons/messages.
  • Not yet exercised against a real dispatch + live Actions run in a real browser -- neither browser tool available in the session that wrote this could reach a local static server (Claude in Chrome wasn't connected; the built-in browser can't open localhost). Recommend one real submission on each page before treating this as fully verified end-to-end.

Claude-Session: https://claude.ai/code/session_01BXPXYXKZCgxnTSNDGCCGYq

Scott Clinton added 2 commits September 21, 2026 12:16
Both pages previously just told the user to go check the Actions tab
after submitting -- a repository_dispatch call returns no run id, so
there was nothing to poll. Adds docs/js/workflow-status.js:
WorkflowStatusBar attributes the run a dispatch just created by
snapshotting existing run ids immediately beforehand and watching for
one that wasn't in that snapshot (the only way to identify it, since
the runs API never exposes a dispatch's client_payload back), then
polls that run's jobs/steps until it finishes, rendering a progress
bar + step list + link to the run the whole way.

upload.html: one status bar per bootstrap-asset.yml submission.
publish.html: one per publish-direct.yml dispatch (it can fire several
per submit, one per checked asset/locale row) -- each request's run is
attributed *before* the next request's dispatch fires, so two requests
started close together can't both claim the same freshly-appeared run;
polling each to completion then runs concurrently in the background
rather than serializing the whole submission.

Also names publish-direct.yml's two checkout steps (translations vs.
translations-templates) -- both were relying on actions/checkout's own
default step name before, which is identical for both and would have
shown as two indistinguishable "Checkout" rows in the new step list.

Verified the status bar's own logic (attribution, step rendering,
success/failure/timeout paths) against mocked API responses in a
Node harness, since neither browser tool in this session could reach
a local static server to exercise it live in-browser.

Claude-Session: https://claude.ai/code/session_01BXPXYXKZCgxnTSNDGCCGYq
The upload page's status bar previously had no label at all (upload.js
passed null); the publish page's already showed "<asset> / <locale>"
per row. Both now consistently show the asset id right above the bar
-- for upload.html, existing-asset mode uses the real selected id,
new-asset mode uses deriveAssetIdPreview() (a preview only: the real
id is always derived server-side by bootstrap_asset.py and could in
principle differ, same caveat as the on-page id preview elsewhere in
this file).

Also adds a small "Actions:" heading directly under the progress bar,
right above the existing step-by-step list (previously just a bare
list with no heading) -- applies to both pages, since they share the
same _renderSteps in workflow-status.js.

Claude-Session: https://claude.ai/code/session_01BXPXYXKZCgxnTSNDGCCGYq
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