Files
gui-video-clipper/docs/superpowers/specs/2026-09-22-v0.1-release-polish-design.md

226 lines
9.6 KiB
Markdown
Raw Permalink Normal View History

# GUI Video Clipper — v0.1.0 Release Polish Design Spec
## Overview
Prepare the GUI Video Clipper project for its initial `v0.1.0` tagged release. This covers versioning infrastructure, metadata cleanup, branding, an About dialog, licensing, a proper README, and pushing to the remote repository.
**Official title:** GUI Video Clipper
**Short title:** gui-vc
**Author:** cottongin
**Remote:** `git@code.cottongin.xyz:cottongin/gui-video-clipper.git`
**License:** MIT (2026)
**App identifier:** `xyz.cottongin.gui-video-clipper`
---
## 1. Versioning Infrastructure
### VERSION File
A plain-text `VERSION` file at the project root. Contains the semantic version with no prefix or trailing whitespace:
```
0.1.0
```
### Bump Script
`scripts/bump-version.sh` — a shell script that synchronizes the version across all manifest files.
**Behavior:**
1. If given an argument (`./scripts/bump-version.sh 0.2.0`), write that version to `VERSION`. Otherwise, read the current `VERSION`.
2. Sanitize the value: strip leading `v` or `V`, trim all trailing whitespace/newlines.
3. Validate the result matches semver (`X.Y.Z`). Exit with an error if not.
4. Patch `package.json` via `npm pkg set version=$VERSION`.
5. Patch `src-tauri/Cargo.toml`: update the `version = "..."` line under `[package]`.
6. Patch `src-tauri/tauri.conf.json`: update the `"version": "..."` field.
7. Run `cd src-tauri && cargo generate-lockfile` to sync `Cargo.lock`.
8. Print a summary of all updated files and the new version.
### Frontend Version Access
The frontend reads the version at runtime via `getVersion()` from `@tauri-apps/api/app`. This reads from the built `tauri.conf.json` — no custom Tauri command needed.
---
## 2. Metadata Cleanup
Replace all placeholder/template values:
| File | Field | Current | New |
|------|-------|---------|-----|
| `src-tauri/tauri.conf.json` | `productName` | `"Video Clipper"` | `"GUI Video Clipper"` |
| `src-tauri/tauri.conf.json` | `identifier` | `"xyz.cottongin.gui-video-clipper"` | `"xyz.cottongin.gui-video-clipper"` |
| `src-tauri/tauri.conf.json` | `windows[0].title` | `"Video Clipper"` | `"GUI Video Clipper"` |
| `src-tauri/Cargo.toml` | `name` | `"tauri-app"` | `"gui-video-clipper"` |
| `src-tauri/Cargo.toml` | `description` | `"A Tauri App"` | `"A macOS GUI app for clipping online videos"` |
| `src-tauri/Cargo.toml` | `authors` | `["you"]` | `["cottongin"]` |
| `src-tauri/Cargo.toml` | `lib.name` | `"tauri_app_lib"` | `"gui_video_clipper_lib"` |
| `src-tauri/src/main.rs` | `run()` call | `tauri_app_lib::run()` | `gui_video_clipper_lib::run()` |
| `index.html` | `<title>` | `"Video Clipper"` | `"GUI Video Clipper"` |
| `src/lib/components/SetupWizard.svelte` | body text | `"Video Clipper requires…"` | `"GUI Video Clipper requires…"` |
The `Cargo.lock` entry for `tauri-app` will auto-update when `cargo generate-lockfile` runs after the crate rename.
### Path Scrubbing
Three files under `docs/superpowers/plans/` contain absolute paths with a username that should not appear in the public repo. Replace all occurrences of the absolute project path with relative equivalents (e.g., `cd /Users/.../gui-video-clipper &&` becomes just the command itself, or a relative path).
Affected files:
- `docs/superpowers/plans/2026-09-21-video-clipper.md`
- `docs/superpowers/plans/2026-09-22-paged-teleprompter-subtitles.md`
- `docs/superpowers/plans/2026-09-22-extended-caption-styling.md`
---
## 3. About Dialog
### Component: `AboutDialog.svelte`
A modal overlay following the existing pattern used by `PreferencesPanel` and `ExportDialog`.
**Contents (top to bottom):**
- App icon (the scissors/film strip SVG, rendered as an `<img>` or inline SVG, ~64px)
- "GUI Video Clipper" as the title
- Version string (e.g., "v0.1.0") read via `getVersion()` from `@tauri-apps/api/app`
- "by cottongin"
- "MIT License"
- Link to repo: `https://code.cottongin.xyz/cottongin/gui-video-clipper`
- "Close" button
**Styling:** Matches the existing dark theme (Catppuccin Mocha palette). Centered modal, rounded corners, consistent with `PreferencesPanel`.
### Triggers
Three ways to open the About dialog:
1. **Toolbar button:** An `(i)` / info button in the header toolbar, next to the existing `⚙` preferences button.
2. **Keyboard shortcut:** `⌘/` — added to the global `handleGlobalKeydown` in `App.svelte`.
3. **Status bar version:** A clickable `v0.1.0` label in `StatusBar.svelte`.
All three toggle the same `showAboutDialog` state in `App.svelte`.
---
## 4. Window Title
The window title is set statically in `tauri.conf.json` as `"GUI Video Clipper"`. No runtime version suffix — the version is available in the About dialog.
---
## 5. LICENSE & README
### LICENSE
A standard MIT license file at project root (`LICENSE`).
```
MIT License
Copyright (c) 2026 cottongin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
### README.md
Full rewrite replacing the stock Tauri template. Sections:
1. **Title & Description** — "GUI Video Clipper" with a one-line description: a macOS desktop app for clipping segments from online videos.
2. **Features** — URL input (YouTube, etc.), video preview with scrubbing, mark in/out points, timeline with waveform and thumbnails, clip export (lossless and precise modes), caption/subtitle support with burn-in, automatic dependency setup wizard.
3. **Prerequisites** — macOS, Node.js, Rust toolchain. ffmpeg and yt-dlp are installed automatically by the setup wizard.
4. **Build & Run** — `npm install`, `npm run tauri dev` (development), `npm run tauri build` (production).
5. **Architecture** — Tauri v2 backend (Rust) + Svelte 5 frontend (TypeScript). Brief description of the major components: video resolver, media server, waveform generator, thumbnail extractor, export pipeline.
6. **Contributing** — Fork, branch, PR workflow. Run `npm run check` before submitting.
7. **License** — MIT, with a link to the LICENSE file.
No screenshots.
---
## 6. Icons
The custom icon set (scissors cutting a film strip, dark background) is already in place at `src-tauri/icons/` with all required sizes:
- `icon.svg` (source) + color variants in `variants/`
- `icon.png` (512x512), `32x32.png`, `128x128.png`, `128x128@2x.png`
- `icon.icns` (macOS), `icon.ico` (Windows)
- Windows Store logos (`Square*.png`, `StoreLogo.png`)
- iOS and Android directories
The `tauri.conf.json` bundle icon paths already reference the correct files. **No changes needed.**
---
## 7. Git History Scrub
The committed history contains `REDACTED_USERNAME` in blob content (not in author/committer fields — those are already `cottongin`). Specifically:
- `src-tauri/tauri.conf.json`: the old `"xyz.cottongin.gui-video-clipper"` identifier
- `docs/superpowers/plans/*.md`: absolute paths like ``
### Approach: `git-filter-repo --replace-text`
After all code/config changes are committed, use `git-filter-repo` to rewrite history:
1. Create a replacements file (e.g., `replacements.txt`) with literal string replacements:
```
xyz.cottongin.gui-video-clipper==>xyz.cottongin.gui-video-clipper
==>
==>
```
Each line is `OLD==>NEW`. The path replacements remove the absolute prefix, leaving just the command (or a relative path). Order matters — longer matches first.
2. Run: `git filter-repo --replace-text replacements.txt --force`
3. Verify: `git log --all -p | grep -i REDACTED_USERNAME` should return nothing.
4. Clean up: remove `replacements.txt` (it's a one-time tool, not committed).
**Important:** `git-filter-repo` rewrites all commit hashes. Since this repo has never been pushed to a remote, that's fine — there's no shared history to disrupt. The remote must be re-added after `filter-repo` runs (it strips remotes by default).
---
## 8. Commit, Remote & Tag
### Commit Strategy
1. Make all code/config changes (sections 1-5 above).
2. Stage and commit everything — including all currently untracked files (`chat-summaries/`, `docs/superpowers/`, new source files under `src-tauri/src/services/`, `src/lib/components/ProcessingModal.svelte`, `src/lib/utils/vttParser.ts`).
3. Use a descriptive commit message: `chore: v0.1.0 release polish — versioning, branding, about dialog, license, readme`.
### History Scrub
4. Run the `git-filter-repo --replace-text` pass (Section 7).
5. Verify no `REDACTED_USERNAME` remains in any blob.
### Remote & Tag
6. Re-add the remote (filter-repo removes it): `git remote add origin git@code.cottongin.xyz:cottongin/gui-video-clipper.git`
7. Tag: `git tag -a v0.1.0 -m "Initial release"`
8. Push: `git push -u origin main && git push origin v0.1.0`
---
## Non-Goals
- No CI/CD pipeline setup (future work).
- No `.dmg` / installer packaging (future work).
- No changelog generation (future work).
- No automated version bumping via git hooks.