Spaces:
Sleeping
Sleeping
Commit History
-
Account row: build it into the sidebar foot (Claude-style)
Tengo Gzirishvili +1: Claude Opus 4.8Move the signed-in user's identity from the wrapper's floating bottom-left chip into the engine's own sidebar — a docked account row at the foot of the nav rail (avatar + email + "Signed in"), with an upward popover menu showing the full email and "Sign out", exactly like Claude's account area. - index.html: add #sidebarAccount (trigger + menu) inside <aside> after <nav>; .nav is flex:1 so it pins to the bottom. Bump asset cache-buster. - app.css: .sidebar-account / .acct-* styles using existing tokens (adapts to dark mode); menu item uses the ink-strong hover (black bg / white text). - auth.js: _renderSidebarAccount() (uses td_user_email; hidden for anon), _initSidebarAccount() wiring (toggle, outside-click + Escape close), and a proper _fullSignOut() that asks the /app wrapper to drop the Supabase session via `td-signout-please` (else re-entry would silently re-sign-in), with a self-navigate fallback for older/standalone wrappers. Verified in preview: row docks at the s…caa515e -
Auth prompts: docked right side-panel instead of centered overlay
Tengo Gzirishvili +1: Claude Opus 4.8The "members-only" sign-in prompt and the "trial ended" prompt used to float centered with a dark blur, covering the whole workspace. Re-dock both as a right-hand side sheet (like a structured side panel): full-height 400px panel, light scrim so the tools stay visible behind, stacked full-width actions. - .modal--sheet modifier reuses the existing modal-panel/header/body internals. - the JS-built trial modal restyled to match. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>756ae28
-
Engine-ready ping for the /app cold-start boot screen
Tengo Gzirishvili +1: Claude Opus 4.8auth.js posts {type:'td-engine-ready'} to the trusted parent (turingdna.com) on DOMContentLoaded so the wrapper's new "Waking the engine…" boot screen can hide reliably even on iOS (where cross-origin iframe load events aren't). Bump auth.js cache-buster to v=20260605-ready. Pairs with the wrapper fix (landing/app/index.html, manual Hostinger upload): the auth check is now time-boxed + always calls loadEngine, a 4s backstop sets the iframe src if the module ever fails, and a boot screen replaces the black void during cold starts — fixing the intermittent "stuck black page". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>94f4f44 -
Retention 90→45 days + live auto-delete countdown in the saved hub
Tengo Gzirishvili +1: Claude Opus 4.8- TTL: FREE_LIBRARY_TTL_DAYS default 90 → 45 (one constant; applies to all four per-user tables — libraries, crispr_designs, plasmids, primer_analyses — for newly saved items). Updated all "90 day(s)" copy across the engine (auth.js trial modal, docs, members-only modal, saved-hub subtitle) and the 0006 migration comment. - Saved hub: each row now shows a live "44d 23:59:58 left" countdown to auto-deletion, ticking every second while the panel is open (interval cleared on close). <24h flags urgent; null expires_at (future pro plans) shows "kept". All four list endpoints already return expires_at. Mobile: the countdown + download wrap below the label, no overflow. Verified live in preview: countdown decrements, urgent state, "kept" state, timer stops on close, zero console errors. Bump cache-busters to v=20260605-ttl. (Landing privacy page retention 90→45 edited too — manual Hostinger upload.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>94b29e6 -
Session refresh: push rotated JWT into iframe (no reload, no "out of sync" loop)
Tengo Gzirishvili +1: Claude Opus 4.8Root-cause fix for the "session out of sync that a reload won't clear" loop. The engine iframe caches the Supabase access token in sessionStorage but has no Supabase keys, so it can't refresh it. After the 1-hour token expired, every /api/* call 402/403'd and a reload couldn't help (getSession returns the same cached value first). Previously we could only mitigate by clearing the dead token on the modal buttons. Now auth.js accepts a live token-refresh PUSH from the /app wrapper: - _stashTokens(): single writer shared by the URL-fragment path and the new postMessage path. - message listener (origin-allowlisted to turingdna.com / www): writes the fresh JWT to sessionStorage and silently dismisses the session-expired modal. - _requestParentTokenRefresh(): on a signed-in 402/403, ask the wrapper for a fresh token (carries no secret) instead of nagging immediately. - _onSignedInAuthFailure(): 1.5s grace — if the silent refresh lands, the user continues with no modal and no lost wo…2137312 -
Fix reported production bugs: stuck dropdowns, blocked SNP, session loop
Tengo Gzirishvili +1: Claude Opus 4.8From a user bug report (4 issues): (4) Stuck/overlapping toolbar dropdowns — opening "GenBank ▾" then "Use in ▾" left BOTH open and overlapping: each button's stopPropagation blocked the other menu's outside-click close. Now opening one closes the other (operate on all .plasmid-export-menu); outside-click closes all. Verified. (2) "Couldn't do a single-nucleotide mutation" on the DE engine — a SNP that creates a stop codon was hard-blocked at BOTH layers (client save disabled; server 400) with a FALSE "synthesis vendors will reject this" claim. A premature stop is a legitimate nonsense/truncation mutation; vendors synthesize it fine. Now allowed: server truncates the product at the first stop (no raise); client downgrades the warning high→medium so Save works. Frame-break (non-×3) and non-ACGT still correctly block. +4 tests. (1) "Session out of sync" that reload/re-signin won't clear — confirmed a stale-token loop (works in a fresh/incognito …e52101b
-
Honest copy on session-out-of-sync modal
Tengo Gzirishvili +1: Claude Opus 4.7User reported confusion: "Sign-in tokens expire after about an hour" fired immediately after sign-in, which is misleading. The real cause for a fresh signed-in user hitting this modal is most likely backend JWT rejection (SUPABASE_JWT_SECRET env-var mismatch), NOT token expiry. Re-cast the copy so it doesn't make false claims about duration: kicker: "§ Session expired" → "§ Session out of sync" title: "Your session timed out." → "Refresh your session." body: "Sign-in tokens expire after about an hour…" → "The engine couldn't verify your sign-in for this request…" Buttons unchanged: Reload & continue (top-window reload → wrapper's refreshSession path) + Sign in again (manual re-auth). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>5830f11 -
Fix: signed-in users no longer redirected to /signin on 402/403
Tengo Gzirishvili +1: Claude Opus 4.7Root cause of "thrown back to the start" reports (Instagram comment + two CRISPR testers): when a signed-in user's request returns 402 or 403 (JWT expired, secret skew, race with autoRefreshToken in the wrapper), the fetch wrapper unconditionally top-redirects to /signin. The wrapper's getSession() returns the cached dead session first, so the user round-trips straight back to /app/ with the same dead JWT, indistinguishable from "trial expired" for them. Two-part fix: 1. _readFragmentAndStash now wipes localStorage.td_trial_started_at the moment a JWT is captured (also at module load if sessionStorage already carries one). The trial-modal guards on _accessToken() already prevent the misfire, but the stale key was defensive debt — wipe it. 2. fetch wrapper's 402/403 handler now branches on _accessToken(): - falsy → genuinely anonymous → existing redirect-to-/signin path - truthy → signed-in user whose JWT was rejected → new "session expired" m…ec1badb
-
Kill CRISPR reload loop + ship friendly anon modal
Verified signature50d9d32 -
Fix CRISPR signin_required false-positive: trust backend, handle 403 in auth.js, persist sequence across iframe reload
Verified signaturee1439a5 -
Trial modal copy (password not magic-link) + session resume across signin bounce
Verified signature5c285bb
-
Audit sweep: signin redirects, honest footer, runBtn defensive type, JWT refresh fix
Verified signature5d532c1 -
Trial timer: 5-min anonymous window + in-engine sign-in modal
Verified signaturea40eea6