Bug fixes / UX
- Footer: the privacy line still claimed 'generation runs in your
browser'. Now correctly says the generation runs on the server and
the key never reaches the browser.
- History panel: when the panel was open while a new generation
completed, the new entry didn't appear until the user closed and
re-opened the panel. The history module now dispatches a custom
'melodymuse-history-updated' event on every write; the panel
listens and re-reads. removeFromHistory/clearHistory emit too.
writeAll is also now try/catch'd against quota errors.
- Auto-save the input form: the input is persisted to localStorage
('melodymuse-draft', debounced 400ms) so a refresh doesn't wipe
what the user was typing. The initial state hydrates from the
draft on mount.
- Cmd/Ctrl+Enter now works in the Music style field as well as
the idea field — shared onKeyDown handler, propagated through the
StyleField sub-component.
- Full regen ('Generate' / 'Regenerate All') now clears the previous
assets before kicking off the new request, so the skeleton state
shows during the round-trip instead of stale cards with a spinner
on top. Per-section regen still leaves the other cards intact.
- Settings → Local data: the in-progress draft is now listed
alongside history and theme, and has its own 'Clear in-progress
draft' button. The 'Clear all local data' button clears it too.
UX
- Add elapsed-time counter and Cancel button to in-flight generations,
wired through AbortController so partial responses are discarded
cleanly. The cancel action is available from both the input panel
and the results header.
- Add a Recent generations panel below the input. The last 6 successful
generations are saved to localStorage; one click reloads both the
input fields and the generated assets.
- Add a Revert button to every editable card. It appears the moment
the current value diverges from the last generated value and restores
the field with a single click.
- Add an Empty state to the right panel with a friendly hint pointing
at the Generate button and the Settings page.
- Add a 'Try an example' button that fills the input with a random
starter idea (idea + mood + vocals).
- Add Cmd/Ctrl+Enter as a keyboard shortcut to generate.
- Add a Footer with project info and a privacy reminder.
- Add a 'Clear saved key' button to the Settings page so the user can
remove the API key without overwriting it.
Bug fix
- Settings > Test Connection used to save the in-progress form values
to localStorage before testing. It now uses the in-memory candidate
config, so failed tests don't pollute the saved config.
Code quality
- Extract the duplicated useAutoHeight hook to src/lib/useAutoHeight.ts.
- Extract a useElapsed hook for the loading timer.
- Move InputValues into src/lib/types.ts (was duplicated in
InputPanel.tsx) and add SECTION_LABELS, replacing the humanizeSection
switch in HomePage.
- Centralize the filename sanitization: HomePage now calls
sanitizeFilename from zip.ts instead of duplicating the regex.
- Add previewConfig / testConnectionWithConfig helpers to llm.ts to
support in-memory connection tests.