From 74c676df9fce376c7d59341f976dd546947e87ee Mon Sep 17 00:00:00 2001 From: Anthony GAEREMYNCK <1@anthony.sh> Date: Sun, 2 Aug 2026 10:57:41 +0200 Subject: [PATCH] specs --- .claude/settings.json | 3 +- .../plans/2026-07-31-file-card-polish.md | 656 ++++++++ .../plans/2026-08-01-archive-conversion.md | 1327 +++++++++++++++++ .../2026-08-01-archive-conversion-design.md | 149 ++ 4 files changed, 2134 insertions(+), 1 deletion(-) create mode 100644 docs/superpowers/plans/2026-07-31-file-card-polish.md create mode 100644 docs/superpowers/plans/2026-08-01-archive-conversion.md create mode 100644 docs/superpowers/specs/2026-08-01-archive-conversion-design.md diff --git a/.claude/settings.json b/.claude/settings.json index 684ebdc..d9a455a 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -28,6 +28,7 @@ "enabledPlugins": { "superpowers@claude-plugins-official": true, "claude-seo@agricidaniel-claude-seo": true, - "ui-ux-pro-max@ui-ux-pro-max-skill": true + "ui-ux-pro-max@ui-ux-pro-max-skill": true, + "frontend-design@claude-plugins-official": true } } diff --git a/docs/superpowers/plans/2026-07-31-file-card-polish.md b/docs/superpowers/plans/2026-07-31-file-card-polish.md new file mode 100644 index 0000000..736527f --- /dev/null +++ b/docs/superpowers/plans/2026-07-31-file-card-polish.md @@ -0,0 +1,656 @@ +# File Card / Language Switcher Polish Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Give the file-conversion flow (`frontend/`) flag-icon language switching, a restyled format/quality picker, a consistent icon+name+size header across the choose/convert/download states, and human-readable file sizes — all frontend-only, no backend changes. + +**Architecture:** A new `formatBytes()` util plus a shared `.file-tile-header` CSS shape used by both `FileConfigCard` (choose step) and `FileCard` (convert/download step), which stay separate components. File size is read from the browser `File` object client-side and threaded through `HomePage` state into both components — no API change. The language switcher swaps its text label for a `flag-icons` icon. + +**Tech Stack:** React 19, `react-i18next`, `@phosphor-icons/react` (already installed), `flag-icons` (new), plain CSS with the existing `--color-*` custom-property design tokens. + +## Global Constraints + +- `flag-icons` must be added to **both** `frontend/package.json` and root `package.json` dependencies, with `npm install` run in both locations (o2switch shared-hosting single-`node_modules` constraint — see `CLAUDE.md`). +- No backend/API changes. File size is derived entirely from the client-side `File.size` already available at selection time. +- No new automated frontend test harness — this project has none today; verification is manual (`npm run dev`) plus plain `node` sanity checks for pure functions. +- `FileConfigCard` and `FileCard` remain separate components (different responsibilities) — share CSS classes, not a merged component. +- The target-format picker stays a native ` onTargetFormatChange(index, event.target.value)} + > + {item.targets.map((target) => ( + + ))} + + {item.targetFormat && {item.targetFormat.toUpperCase()}} + + + {QUALITY_FORMATS.includes(item.targetFormat) && ( + + )} + + {item.targetFormat === 'png' && ( + + )} + + {item.targetFormat === 'ico' && ( + + )} + + {item.targetFormat === 'pdf' && ( + + )} + + ) : ( + {t('hero.unsupportedFormat')} + )} + + ); +} +``` + +- [ ] **Step 4: Manual check** + +Run `npm run dev` inside `frontend/`. Select an image file, confirm: the file icon, name, and a size like "1.2 MB" appear on one line; the format `