Improve filename parsing and title generation; add browser deploy notifications and fallback UI#11
Improve filename parsing and title generation; add browser deploy notifications and fallback UI#11CircleCrop wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves the internal web uploader’s robustness and operator UX by expanding filename parsing/title generation (including VOL/BOX-aware titles and explicit src/rip/flt handling), adding a manual “full filename” frame-title fallback, and introducing browser notifications for long-running Cloudflare Pages public deploys.
Changes:
- Expanded source filename parsing to support spaced separators, preserve explicit variants (src/rip/flt), and generate volume-aware frame titles.
- Added a manual fallback action to replace frame titles with full source-filename + frame number, wired through the workbench UI.
- Added optional browser notification permission prompting on deploy clicks and success notifications after public deploy completion.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| apps/internal-site/components/web-uploader/web-upload-workbench.tsx | Wires a new “fallback frame titles” action into the uploader workbench. |
| apps/internal-site/components/web-uploader/web-upload-view-model.ts | Adds logic to derive explicit full frame titles from source paths and apply them across the plan. |
| apps/internal-site/components/web-uploader/web-upload-view-model.test.ts | Adds a unit test validating the fallback title formatting behavior. |
| apps/internal-site/components/web-uploader/web-upload-pairing-preview.tsx | Adds a UI button to trigger the fallback frame-title behavior. |
| apps/internal-site/components/web-uploader/source-scanner.ts | Updates parsing regexes, variant prioritization/labels, and adds VOL/BOX title inference. |
| apps/internal-site/components/web-uploader/source-scanner.test.ts | Updates/adds tests covering preserved variants, spaced separators, and volume-aware titles. |
| apps/internal-site/components/case-workspace/workspace-action-helpers.ts | Adds browser notification permission request + success notification for public deploys. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const volume = volumeLabel(candidate.rootHint); | ||
| return volume ? `${volume}-${candidate.episode}-${candidate.frameNumber}` : `${episode}-${candidate.frameNumber}`; |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2c23b453ad
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ? sourceVariantLabel(candidate.variant) | ||
| : kind === "after" | ||
| ? "After" | ||
| ? variantLabel(candidate.variant) || "After" |
There was a problem hiding this comment.
Keep heatmap reference aligned with primary after label
When the only comparison file is an explicit rip variant (for example ...-src.png plus ...-rip.png), this now labels the primary after asset Rip, but both scan paths still initialize heatmapReferenceLabel to "After". ensureGeneratedFrames passes that stale label into generateUploadFrames, which calls heatmapAfterAsset and throws because no asset is labeled After; with only one comparison option the selector is hidden, so the upload cannot proceed unless the operator guesses to rename the column. Initialize the heatmap reference from the selected after label when preserving variant labels.
Useful? React with 👍 / 👎.
| const IGNORED_BASENAMES = new Set([".ds_store", "thumbs.db"]); | ||
| const IGNORED_SUFFIXES = new Set([".json", ".yaml", ".yml", ".txt", ".md", ".csv", ".db", ".log"]); | ||
| const FILENAME_RE = /(?<prefix>.+?)[_\-.](?<frame>\d+)(?:[_\-.](?<variant>[^_\-.]+))?$/; | ||
| const FILENAME_RE = /(?<prefix>.+?)[_\-. ]+(?<frame>\d+)(?:[_\-. ]+(?<variant>[^_\-. ]+))?$/; |
There was a problem hiding this comment.
Strip flt when grouping parsed flat variants
With the new space-tolerant flat parser, names like clip - 001 - src.png, clip - 001 - rip.png, and clip - 001 - flt.png are accepted, but matchKeyForName only strips variants listed in MATCH_KEY_VARIANTS; since flt is not listed, the flt candidate keeps the key clip-001-flt while src/rip use clip-001, producing a separate before-count error instead of a misc asset. Add newly supported explicit comparison variants such as flt to the match-key suffix list.
Useful? React with 👍 / 👎.
Motivation
Description
notifyBrowserPublicDeploySuccessandrequestBrowserPublicDeployNotificationPermissioninworkspace-action-helpers.ts.source-scanner.tsby accepting spaces as separators inFILENAME_REandSTRUCTURED_SOURCE_FILENAME_RE, preserve explicit variants in structured filenames, and prefer explicit variant when parsing candidates.volumeLabeldetection to inferVOL/BOXlabels and incorporate volume-aware titles intoformatCandidateFrameTitle, producing titles likeVOL1-00000-27240when applicable.ripwith its own priorities inafterPriority/alternatePriority, addsourceVariantLabelsosrc/source/oriproduce faithful column names, and ensureassetPlanuses these labels.fallbackUploadPlanFrameTitlesinweb-upload-view-model.tsand wire a UI button使用完整 m2ts-帧号inPairingPreviewPanelplus handler wiring inWebUploadWorkbench.source-scanner.test.tsandweb-upload-view-model.test.ts).Testing
source-scannertests andweb-upload-view-modeltests, and all new and modified tests passed.Codex Task