Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions app/components/editing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export function PreviewLink({
const open = (preview?: Window | null) => {
pauseDemoForPreview();
if (preview) preview.location.replace(href);
else window.open(href, "_blank", "noopener,noreferrer");
else window.open(href, "_blank", "popup,noopener,noreferrer");
};
const close = () => {
if (!busy) setLabels(null);
Expand All @@ -268,14 +268,24 @@ export function PreviewLink({
{...(label && {
className: "tooltip",
"data-tooltip": label,
"aria-label": `${label} (opens in a new tab)`,
"aria-label": `${label} (opens in a new window)`,
})}
onClick={(event) => {
const dirty = [...(editors?.values() || [])].filter((editor) =>
editor.dirty(),
);
if (!dirty.length) {
pauseDemoForPreview();
if (
event.metaKey ||
event.ctrlKey ||
event.shiftKey ||
event.altKey
) {
pauseDemoForPreview();
return;
}
event.preventDefault();
open();
return;
}
event.preventDefault();
Expand All @@ -288,7 +298,7 @@ export function PreviewLink({
) : (
<>
{children} <span aria-hidden="true">↗</span>
<span className="sr-only"> (opens in a new tab)</span>
<span className="sr-only"> (opens in a new window)</span>
</>
)}
</a>
Expand Down Expand Up @@ -319,8 +329,8 @@ export function PreviewLink({
<button
disabled={busy}
onClick={async () => {
// Open synchronously so browsers do not block the tab after saving.
const preview = window.open("about:blank", "_blank");
// Reserve the popup during the click, before saving loses user activation.
const preview = window.open("about:blank", "_blank", "popup");
if (preview) preview.opener = null;
setBusy(true);
try {
Expand Down
2 changes: 1 addition & 1 deletion docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Use synthetic media and disposable accounts. Test listeners in a separate/privat

On a physical iPhone with HTTPS and the configured `APP_URL`, check uploads, actual audio, repeat pinch/pan/hold gestures, narrow layouts, downloads, background playback, interruptions, automatic release progression, and lock-screen resume. Verify title/artist/artwork updates, a demo without artwork, release cover replacement, and metadata cleanup after errors or leaving the player. Public navigation keeps the media session; private covers still require authorization. Browser automation cannot replace these device checks.

Also add Wavecase to the iPhone Home Screen from a nested page, such as a demo detail page. Launch it, sign in if needed, and navigate between Dashboard, Work in progress, demo details, activity, artists, releases, and account settings. Ordinary same-origin navigation must stay in the standalone app without opening a Safari sheet with a close button and floating browser controls. Check narrow layouts and safe-area spacing in both Safari and the installed app. Preview links intentionally open a separate browsing context. Also install from a listener share or public release page and verify that launching returns to that music; the manifest leaves `start_url` unset to preserve the page chosen at installation. If an existing Home Screen installation retains its earlier navigation behavior, remove and re-add it after the manifest update, then repeat the check.
Also add Wavecase to the iPhone Home Screen from a nested page, such as a demo detail page. Launch it, sign in if needed, and navigate between Dashboard, Work in progress, demo details, activity, artists, releases, and account settings. Ordinary same-origin navigation must stay in the standalone app without opening a Safari sheet with a close button and floating browser controls. Check narrow layouts and safe-area spacing in both Safari and the installed app. Preview links request a separate popup: check the normal preview, Preview saved version, and Save and preview for both demos and releases. iOS must expose its close control; closing the preview must return to the same management page with its edits and playback position retained, and the workspace demo must remain paused. Canceling the unsaved-changes dialog must open nothing; a failed save must close its reserved popup and leave the editor available. Also install from a listener share or public release page and verify that launching returns to that music; the manifest leaves `start_url` unset to preserve the page chosen at installation. If an existing Home Screen installation retains its earlier navigation behavior, remove and re-add it after the manifest update, then repeat the check.

For lock-screen controls, verify title/artist/artwork and play/pause on the physical iPhone. The worklet player should have no reported elapsed time or progress timeline and no seek/previous/next commands. Check pause/resume after app switches, lock/unlock, track changes, repeat boundaries, production/stage navigation, interruptions and reaching the queue end. In-app waveform and slider seeking, repeat and automatic release progression must continue to work with the production worklet engine. Confirm that a previous player's timeline is cleared and errors, revocation and player exit clear metadata/handlers. `media-session` tests cover metadata, play/pause, position clearing and the absence of time reports and seeking actions. iOS controls the actual layout; native fallback elements may still expose a browser-owned timeline.

Expand Down
2 changes: 1 addition & 1 deletion docs/wavecase-specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Artist administration has a name-sorted grid of fully clickable cards with profi

Artist management presents the profile image, name, biography, artwork-based discography, and a compact links column. Profile, links, and image changes open scoped editors. Release management presents artwork and identity before the track list, with a separate Activity view. Metadata, artwork, track details, and masters use contextual dialogs; less frequently edited credits and identifiers are expandable. Editor dialogs mount fresh values on opening, confirm discarded changes, remain open on errors, and close after successful saves with focus returned to their trigger. Profile saves preserve links unless links are explicitly supplied; link saves preserve the profile. Demo Upload new version opens a focused dialog; the inline link overview sits above Feedback. Catalog artwork has bounded widths, dashboard feedback/recent music precede compact statistics, and private library rows show the newest version and its status.

Management editors save each section independently, show unsaved/saved status, and warn before leaving with unsaved edits. Preview links open a new tab with saved content; when sections are dirty, offer Save and preview, Preview saved version, or Cancel. Saving one section preserves edits in other sections. There is no autosave.
Management editors save each section independently, show unsaved/saved status, and warn before leaving with unsaved edits. Preview links request a separate popup window with browser-owned close controls, including from the installed Home Screen app; ordinary workspace navigation stays within the app. Previews show saved content; when sections are dirty, offer Save and preview, Preview saved version, or Cancel. Saving one section preserves edits in other sections. There is no autosave.

Release management supports title/artist search, without separate artist or publication-status filters. Artist editors show the current image and all owned releases, including drafts, with an artist-preselected Add release shortcut. Release editors provide contextual detail/artwork editors, collapsed track rows with audio status, a separate Activity view, a publication checklist, and a single action row with an edit icon, an eye icon for preview, a status-dependent Publish/Unpublish text button, and a red delete icon. Artwork editing uses an icon overlaid on the current cover, matching artist image editing. Demo headers expose Upload new version and Edit track. The artist appears beside the title; empty track/version descriptions are not shown. Edit track opens a combined title, artist, and description form, with Delete track at the bottom leading to its separate confirmation. The shared cover sits at the right of the track identity, outside the version module, and stacks on small screens. Clicking it opens the cover editor, which can replace or remove the image; owners without artwork see Add cover. Version menus show names only in larger text and size to the selected name, bounded by the available width. Show the menu only when more than one version is available; otherwise show the version name as plain text with the same typography. Edit version sits at the upper right of the player module and opens a combined name, description, status, and download-permission form. It also shows the uploaded file name as read-only information, wrapping long names within the dialog. A replacement-upload icon overlaid in the upper-right corner of the waveform appears on hover or keyboard focus and remains visible on touch devices; missing audio offers Restore audio. There are no separate Version settings or Track details panels or Share/Feedback anchor shortcuts. Dashboard quick actions precede statistics. Link editors use separate name and URL fields, and creation forms display the proposed immutable public address. Explain why the last passkey cannot be removed.

Expand Down
2 changes: 1 addition & 1 deletion tests/icon-controls.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ test("share link icon controls name their link and show it as a focusable toolti
);
assert.ok(
html.includes(
'aria-label="Preview as listener: Mixing team (opens in a new tab)"',
'aria-label="Preview as listener: Mixing team (opens in a new window)"',
),
);
assert.ok(
Expand Down
Loading