Skip to content
Merged
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
6 changes: 4 additions & 2 deletions ui/src/app/(app)/kits/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,17 @@ export default function KitsPage() {
}, []);

/** A kit app runs outside this Next app, so it gets its own tab. */
/** The kit app is this origin's own page, so the tab keeps its handle: `noopener` makes
* window.open return null, which is what left the tab launch opened blank forever. */
function openApp(route: string) {
window.open(route, '_blank', 'noopener,noreferrer');
window.open(route, '_blank');
}

async function launch(kit: Kit, base?: string, model?: string, database?: DbDraft) {
// Open the tab NOW, on the click, and navigate it when the launch returns. Opening it after
// the await is a popup the browser is entitled to block, because by then it is no longer a
// user gesture.
const tab = window.open('', '_blank', 'noopener,noreferrer');
const tab = window.open('', '_blank');
setBusy(kit.id); setErr('');
try {
const r = await harnessFetch(`/api/harness/v1/kits/${kit.id}/launch`, {
Expand Down
Loading