ReleaseDraft: upload diagnostics panel#82
Merged
jMyles merged 3 commits intoMay 31, 2026
Conversation
…anel
Justin's pinning service already persists upload_log, finalize_log, and
preview_log on each content draft and exposes them via /draft-content/{id}.
The wiki side wasn't reading them — a failed transcode or pin showed up
on the draft page as a single static "Preview transcoding failed" line
with no detail.
Adds an Upload Diagnostics panel (placeholder rendered server-side,
populated by JS on load) that pulls all three logs from delivery-kid:
- Red banner with the last error when status is upload_failed,
finalize_failed, or preview_status is failed
- Info banner while uploading / finalizing / preview transcoding
- Collapsible <details>, auto-expanded on any *_failed state and
collapsed otherwise, listing each log entry with timestamp, stage,
message, progress, and structured error text
Polls /draft-content every 10s while in-flight, then stops once the
draft reaches a terminal state. Album drafts use a different endpoint
without logs and are skipped.
…draft
When initDiagnostics' fetch of /draft-content/{id} returns 404, fall
back to reading ReleaseDraft:{id}/diagnostics via the MediaWiki API.
That sub-page is written by delivery-kid's pickipedia_client at every
terminal-state transition (cryptograss/maybelle-config branch
delivery-kid-snapshot-diagnostics) and survives a delivery-kid storage
rebuild.
The renderer marks snapshot-sourced data with "(snapshot)" in the
disclosure summary and surfaces snapshot_at + a "wiki snapshot —
delivery-kid no longer has live data" note in the meta block, so users
know they're looking at a frozen view rather than live state.
The earlier stage-logs work in this area (bd9fb4d, ef4c001, 48acf92) rendered upload_log and finalize_log into a pair of plain #rd-upload-log and #rd-finalize-log divs, polling /draft-content every 5s. The diagnostics panel added in 14c0d7d is a strict superset: - renders upload_log + finalize_log + preview_log (stage-logs missed preview_log entirely) - falls back to the wiki snapshot when delivery-kid 404s (stage-logs just stopped) - has terminal-state error banners with auto-expand on *_failed - same poll target, same headers, same terminal-state stop logic Keeping both meant rendering the same upload_log / finalize_log data twice on every content-draft page. Drop the stage-logs divs from ReleaseDraftContentHandler, drop initStageLogs + renderStageLog from the JS, and drop the .rd-stage-log* CSS block. The diagnostics panel is the single home for these logs going forward.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #81 — rebased onto current
productionand re-targeted frommagent-cryptograss/pickipediaper the standing fork policy.What's here
Three commits:
14c0d7d— ReleaseDraft: surface upload/finalize/preview logs as a diagnostics panel (Sky's original)e7d7e08— ReleaseDraft: fall back to wiki snapshot when delivery-kid forgets a draft (Sky's original, paired with maybelle-config #87)bc57560— ReleaseDraft: remove stage-logs UI superseded by the diagnostics panel (added during rebase; see below)Why the stage-logs removal
Production grew a parallel "stage logs" track while Sky's branch was in flight (
bd9fb4d,ef4c001,48acf92) — it polled/draft-contentand renderedupload_log+finalize_loginto#rd-upload-logand#rd-finalize-logdivs.The diagnostics panel from
14c0d7dis a strict superset of that work:/draft-contentupload_logfinalize_logpreview_log*_failedKeeping both meant rendering the same
upload_log/finalize_logdata twice on every content-draft page.bc57560deletes the stage-logs divs fromReleaseDraftContentHandler.php,initStageLogs+renderStageLogfrom the JS, and the.rd-stage-log*CSS block. The diagnostics panel is the single home for these logs going forward.Test plan
ReleaseDraft:{id}/diagnosticssub-page snapshot