Spaces:
Sleeping
Sleeping
Commit History
-
Reframe app around Design→Build→Edit→Learn loop
Tengo Gzirishvili +1: Claude Sonnet 4.6Reorders the sidebar and Start-Here router to lead with Directed Evolution, adds loop-anchoring copy to the DE/Plasmid/CRISPR/Primer view headers, and gives DE variant panels an "Open in Plasmid Editor" hand-off that sends the designed insert straight into the Plasmid Editor's import box. Also drops the topbar glow-line accent. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1fdd762
-
Remove logo glow; fix mobile stretch (stray sidebar override)
Tengo Gzirishvili +1: Claude Opus 4.8Two fixes: - Drop the bio-luminous glow/pulse/bloom on the plasmid logos (sidebar + home masthead) per request — the marks render clean. Ambient atmosphere, cursor aurora, active-nav marker and hairline blooms all stay. - FIX mobile "outstretched" layout: the sidebar-brand bloom block included a stray `:root[data-theme="dark"] .sidebar { position: sticky; }`. That selector outranks the mobile drawer rule (`.sidebar{position:fixed}` inside @media), so on mobile-dark the sidebar snapped back into flow at height:100vh and shoved the workspace down a full screen. Removing the logo-glow block removes that line — sidebar is an off-canvas drawer again. Verified mobile (375px): engine sidebar fixed/off-canvas (left:-280), content starts after the policy banner (no gap); home masthead at top, no overflow. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>bb8820c -
Bio-luminous: cursor-following aurora (home + app)
Tengo Gzirishvili +1: Claude Opus 4.8Adds a mouse-interactive luminous layer to both pages: a soft GFP-cyan light that smoothly TRAILS the pointer (eased lerp), so the dark canvas feels lit by a source you're moving — the high-end "alive" touch. - #cursorGlow: fixed, transform-only (GPU-cheap), driven by JS --cx/--cy. - Desktop only (@media pointer:fine), dark-mode only, OFF for reduced-motion. - rAF loop self-stops once settled + pauses on hidden tabs; fades out on mouseleave. Dimmer on the engine (busy data tool) than the home. Verified in preview on both: aurora tracks the pointer, light theme + touch unaffected, no console errors. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>96969f1 -
Bio-luminous aesthetic: engine atmosphere (depth + living glow)
Tengo Gzirishvili +1: Claude Opus 4.8High-end aesthetic upgrade (dark-first), matching the home page so the app feels like the same product. Additive atmosphere layer — no rewrite of the editorial/monochrome bones, accent used as LIGHT only (never a fill), so the black/white button system is untouched: - A GFP/aequorin cyan-teal accent token (--glow), dark-mode only. - Fixed .bg-atmos backdrop: ambient bloom + vignette + faint grain behind the transparent workspace, giving the flat #121110 canvas real depth. - Halo + gentle pulse on the living plasmid mark (the shared signature). - Luminous active-nav marker; hairline bloom on the topbar; bloom behind the sidebar brand. - All motion gated behind prefers-reduced-motion; light theme stays clean paper. Verified in preview: dark glow renders, light mode unchanged, no console errors. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>8aeecc9 -
P0 hardening: model OOM gate + cached scorer + poll give-up
Tengo Gzirishvili +1: Claude Opus 4.8Three reliability fixes from the platform audit: C1 — CPU model gate. The run settings offered ESM-2 650M/3B; the server accepted them; the free Space has no GPU, so a 3B fp32 load (~12–24 GB) OOM-killed the whole container for EVERY user — even an anonymous visitor's one free run could trigger it. Now: _validate_run_settings + _get_scorer downgrade medium/large -> small and drop any cuda/quant request on a non-GPU host; the UI disables the 650M/3B options ("Pro · GPU — coming soon"). Effective model is reflected in settings so analytics + the methods note stay truthful. C2 — Cached scorer. ESM-2 was rebuilt on every /api/run (model reload tax; concurrent runs each resident-loaded a copy → memory multiplied toward OOM). New process-global, lock-guarded _get_scorer() loads weights at most once per effective config and reuses them (warm runs now ~instant on small). M1 — Poll give-up. The frontend polled forever on transient errors. Added a consecutive-error cap (12) and an overall wal…5dde9d0
-
Filled CTAs: light bar at rest in both themes, invert to black on hover
Tengo Gzirishvili +1: Claude Opus 4.8Per the user's choice, the filled primary buttons (.primary / .primary-lg — "Import & map", "Generate library", "Design guides", etc.) are now a LIGHT bar (warm-white fill, ink label, hairline edge) at rest in BOTH light and dark themes, inverting to a near-black rectangle with white text on hover — the same white→black behaviour as the outline/ghost buttons. Before, in light mode these were solid black bars, so hovering them showed no change (only dark mode flipped cream→black). Now both themes behave identically. Icon chip tints dark on the light bar and light once it inverts. Bump cache-buster. Verified in preview: resting bg #FBFAF6 + ink label in light AND dark; hover resolves to #0A0A0A bg + #FBFAF6 text in both. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>3f65210
-
Fix "Import & map" hover: kill the white-on-white from a duplicate rule
Tengo Gzirishvili +1: Claude Opus 4.8The filled CTAs have a SECOND, later set of definitions (~line 3889) that won the cascade. My first pass only fixed the earlier .primary/.primary-lg:hover rules — the later ones still set background to the off-white token while my edit set the text white, so in dark mode hover rendered white-text-on-off-white (the label vanished; "flashed then turned white"). Point the winning .primary:hover / .primary-lg:hover rules at --hover-fill + --hover-text too, so every primary button inverts to a solid near-black rect with white text. Bump cache-buster (users had cached the broken build). Verified via CSSOM: all .primary(-lg):hover rules now resolve to background:var(--hover-fill) + color:var(--hover-text); no rule sets a light fill without white text. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>046914a -
Plasmid: accept SnapGene .dna; fix button hover (black fill, both themes)
Tengo Gzirishvili +1: Claude Opus 4.8Two things: 1) Plasmid Editor now imports SnapGene .dna (binary) alongside GenBank/FASTA/ raw. Biopython 1.87 ships a SnapGene reader, so: - plasmid.py: _record_to_plasmid() shared mapper; parse_snapgene(bytes) + parse_binary() dispatcher (detects .dna by extension OR the 0x09+"SnapGene" signature; size-bounded; filename fallback for unnamed records). - server.py: /api/plasmid/import accepts a base64 `b64` payload (decodes, bounds, parses) in addition to the existing `text` path. - app.js: the Upload-file handler reads .dna/.snapgene/.xdna as bytes → base64 → import; text formats still load into the box. Parsed sequence is dropped into the editor so it's visible + editable. - index.html: accept=".dna,…"; label now says "SnapGene .dna". 2) White/cream buttons now invert to a near-black rectangle with white text on hover — in BOTH themes. The old hover used theme tokens that, in dark mode, flipped to off-white-on-dark (the filled CTAs visib…21dfced -
Alignment: highlight non-matching residues in red
Tengo Gzirishvili +1: Claude Opus 4.8In the pairwise alignment card, every column the server's midline doesn't mark "|" — i.e. mismatches AND gaps — now renders its residue in red (bold, faint red tint) in both strands, so divergence is scannable at a glance. Matching residues stay in the normal ink. - app.js: colorRow() wraps consecutive non-matching runs in <span.align-mm> using the authoritative per-column midline; render() uses it for both rows. - app.css: .align-mm = var(--danger) + weight + var(--danger-light) tint, with no padding/border so the monospace columns stay perfectly aligned (adapts to light/dark via the danger tokens). - index.html: bump asset cache-buster. Verified in preview: red lands on exactly the mismatch + gap columns of both strands, colour resolves to the danger token, alignment columns unshifted. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>dbb031b -
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 -
Add pairwise sequence alignment (Needleman–Wunsch / Smith–Waterman)
Tengo Gzirishvili +1: Claude Opus 4.8Closes the biggest "looks incomplete vs Benchling" gap from the competitive audit — we couldn't align two sequences at all. - dee/core/align.py: numpy global + local pairwise alignment with identity %, match midline, gaps, score; |a|×|b| size cap. +8 unit tests. - POST /api/align (stateless utility, rate-limited, no sign-in gate). - "Align two sequences" card in the Plasmid workbench: two inputs, Global/Local toggle, blocked alignment view + identity/score stats. Verified live: global 88.9% identity with correct midline, local finds the shared region (100%, 0 gaps), empty→400. Full suite 324 passing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>91ed780 -
Fix ESMFold + AlphaFold viewers: lazy, resilient Mol* loader + ESMFold retries
Tengo Gzirishvili +1: Claude Opus 4.8Root cause of "both viewers malfunction a lot": the shared 3-D library Mol* (~4.9 MB) was eager-loaded with `defer` on every page view, and both viewers waited only 8 s for window.molstar — on any slow link or CDN blip the global wasn't ready in time, so BOTH fell back to "Mol* viewer failed to load." - ensureMolstar(): lazy-load on first Fold/AlphaFold use, jsDelivr → unpkg fallback, resolves on the real load event (no fixed timeout); cached, retries on a later click if a source failed. Removes the 4.9 MB from every page load. - ESMFold fetch now auto-retries transient failures (network, 5xx, the occasional HTML-200) up to 3× with backoff; 413/429 still fail fast. - AlphaFold "loader failed" now offers Retry instead of telling the user to refresh. Added CDN preconnects. Verified end-to-end in a browser: fold → valid 51 KB PDB in ~0.8 s → Mol* rendered the canvas; Mol* no longer eager-loaded. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>64f2cf2
-
Plasmid Editor: double-stranded sequence + companion map with linked selection
Tengo Gzirishvili +1: Claude Opus 4.8Benchling-style workspace in Sequence view: - the sequence and a companion circular map now sit side by side (the editor takes full card width; Features flow below). Stacks under 880px. - complement (antisense) strand rendered under each line, 5'→3' over 3'→5'. - selecting a region in the sequence highlights both strands AND mirrors the span as a live arc on the circular map (updated during drag without a full map rebuild); clicking the map jumps the caret to that position. Refactored renderCircular into buildCircularSVG (reused by the full map and the companion), added a #pmSelArc path + updateSelArc, and a seqcSpans track for the complement. No backend change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>4b21a7f -
UI: outline buttons invert on hover (ink fill + paper text)
Tengo Gzirishvili +1: Claude Opus 4.8.ghost / .primary-ghost / .copy-btn now fill with ink and flip the label to paper on hover — black rectangle + white text in light mode, parchment + dark text in dark mode (both via neutral tokens, so contrast holds either way). Icons inside flip too. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>e6b4c6d -
UI: accent → charcoal/espresso monochrome (drop the bronze)
Tengo Gzirishvili +1: Claude Opus 4.8The bronze read as gold once it was the primary button fill — replace it with a monochrome ink treatment: primary CTAs are near-black charcoal on warm paper (cream text) and flip to parchment with dark text in dark mode, both via the neutral tokens so contrast holds. Retoned --brand (links/focus/nav/caret/ selection) to a quiet graphite (light) / warm-grey (dark). Also fixed the authoritative editorial .primary block that hardcoded background:var(--brand) + white text (which would've been white-on-light in dark mode) and carried leftover blue shadows. A position-strength data ramp is now monochrome too. No blue, no yellow anywhere. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>6f3dd42 -
Plasmid Editor: Benchling-style inline sequence editing
Tengo Gzirishvili +1: Claude Opus 4.8Replace the indirect From/To + Delete/Insert flow with direct, click-and-type editing on the sequence canvas: - click to place a blinking caret between bases; drag to select a region - type A/C/G/T/N to insert at the caret (or replace the selection) - Backspace / Delete; arrow keys to move; Shift+arrows to extend selection; Home/End; Cmd/Ctrl+A select-all; Cmd/Ctrl+C copy; paste sanitised to ACGTN - live position + length; features + map remap and restriction sites rescan (debounced while typing so we don't hit the backend on every keystroke) Per-base interactive render below EDIT_CAP (20 kb); larger sequences keep the read-only run view. Also fixes a latent bug where applyEdit refreshed the small meta line but not the Length/GC chips or the methods box — now both update on every edit (affected the old Delete/Insert buttons too). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>d566e10 -
UI: replace archival-blue/teal accent with warm bronze across the engine
Tengo Gzirishvili +1: Claude Opus 4.8The single archival-blue --brand token (plus a scattering of hardcoded blue and teal hexes) drove every primary button, link, focus ring and nav highlight — and clashed with the warm-paper editorial theme. Retone the whole accent to a warm bronze/brass that matches the TuringDNA brand (espresso + brass), in both light and dark modes, including button-shadow tints. 56 CSS + 6 JS swaps, zero residual blue/teal. Bumped the asset cache-buster so returning users get it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>a52c6ca -
Bump v2.0 effective date 2026-07-07 -> 2026-07-08 (full 30-day notice)
Tengo Gzirishvili +1: Claude Opus 4.8The user notice now goes out 2026-06-08, so move the effective date one day to 2026-07-08 to keep the >=30-day advance-notice commitment exact. Updates the aggregation gate constant in both aggregate.py and outcomes.py (the functional gate), the in-app policy-notice banner, and the dating in code/migration comments. Legal docs, emails, and the landing privacy/terms pages updated in their respective trees. Tests: 315 passing (gate tests track the constant symbolically). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>a0ee590
-
fix: Materials & Methods "Copy" button stretched full-width
Tengo Gzirishvili +1: Claude Opus 4.8.copy-btn has flex:1 (correct for button rows), but in .run-methods-head — a space-between flex row with just a heading + the button — it grew to fill the whole card. Scope a flex:0 0 auto override for the methods-box copy button so it stays compact. Verified in preview: button 56px in a 672px row (was full-width). Cache-buster -> v=20260608-btn. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>e2bce0f -
chore: production polish — minify served JS/CSS + proper meta (de-"vibecoded")
Tengo Gzirishvili +1: Claude Opus 4.8Removes the dev-tools tells without touching the (commented) source: - server.py: /static/<*.js|*.css> is now minified on the fly (rjsmin/rcssmin, cached by mtime, long cache headers) — app.js 405→256KB, app.css 202→129KB, comment-free. Source stays the single truth; any minify failure falls back to the raw file. Added rjsmin/rcssmin to requirements. - index.html: meta description, theme-color, color-scheme, referrer policy, and noindex on the raw engine URL (canonical product is turingdna.com). Console already clean (0 console.log). Minified output node-check-valid; app runs on the raw-fallback path in preview with no console warnings. Cache-buster -> v=20260608-min. Suite 285. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>063809e -
feat: primer + cloning capture loops on the unified framework
Tengo Gzirishvili +1: Claude Opus 4.8Two more tools on the shared outcomes layer (moat now spans DE, CRISPR, primer, cloning): - outcomes.py: `primer` ToolSpec (Tm/GC/3'-end/length buckets → amplification success) and `cloning` ToolSpec (method/fragment-count/overlap buckets → assembly success). Both use a signed worked/partial/failed contribution (success/failure, not a continuous assay; one outcome per design). +3 tests. - UI: self-contained "Log amplification result" (Primer view) and "Log cloning result" (Plasmid view) cards → POST /api/outcomes {tool: primer|cloning}. Verified in preview: both send correct bodies (subject formats match the extractors), status renders, no console errors. Suite 281. Cache-buster -> v=20260608-loops. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>8f6819e -
feat: CRISPR learning loop on the unified framework (capture editing efficiency)
Tengo Gzirishvili +1: Claude Opus 4.8First tool added on top of the unified outcomes framework — proves the payoff (a ToolSpec + a capture box, no new infra): - outcomes.py: register a `crispr` ToolSpec — extractor turns logged editing rates into non-identifying position-nucleotide + GC-bucket features (standardized within design), pooled into a learned on-target signal. +2 tests (position-nucleotide recovery, k-anon, bad input). - CRISPR results: a "Log editing efficiency" card (#crisprOutcomeCard) listing the guides with a %-edit input; Save → POST /api/outcomes {tool:'crispr', …} via the generic capture endpoint. Client-generated design grouping id. Verified in preview: card populates from guides, save sends correct body, status renders, no console errors. iOS-safe inputs. Suite 274. Cache-buster -> v=20260608-crisprloop. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>3c2de37 -
notice: align in-app policy bar with the v2.0 user email (+ recourse, re-surface)
Tengo Gzirishvili +1: Claude Opus 4.8Add the export/delete-before-the-effective-date recourse + a contact link to the #policyNotice bar so it matches the 30-day user-notice email (Terms allow email OR in-app notice; we do both). Bump the dismiss key (td_policy_v2_ack -> td_policy_v2_ack_r2) so the updated notice re-surfaces once even to users who dismissed the earlier wording. Verified in preview: re-shows despite old ack, recourse + contact link present, dismiss persists. Cache-buster -> v=20260607-notice2. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>385e30c -
feat: multiplex check + local-specificity (genome upload) UI — primer epic complete
Tengo Gzirishvili +1: Claude Opus 4.8Two more self-contained cards in the Primer Analysis view, completing the versatility epic: - Multiplex compatibility: paste a primer set (+ optional product sizes) -> POST /api/primers/multiplex -> 3' cross-dimer pairs + amplicon size clashes, or "compatible". - Specificity vs your own genome: paste/upload a FASTA (<=12 Mb, read client- side) -> POST /api/primers/local-specificity -> predicted products + a virtual gel; runs on-server so primers never leave (unlike the NCBI scan). Verified both render paths in preview (cross-dimer + size clash; off-target products + gel bands); no console errors. Cache-buster -> v=20260607-pcr2. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>35d1c3b -
feat: de novo primer design UI + amplicon virtual gel (Primer tool)
Tengo Gzirishvili +1: Claude Opus 4.8Self-contained "Design primers from a template" card in the Primer Analysis view: template (+ optional target region + product-size window) -> POST /api/primers/design -> a Tm-matched F/R pair table + a virtual gel of the predicted product sizes (reuses the .gel-* styling). Theme-aware, iOS-safe inputs (16px / 40px). Example button loads a deterministic demo template. Verified in preview: card renders, example populates, render path produces the pair table + gel bands, 403 -> sign-in, zero console errors. Cache-buster -> v=20260607-pdesign. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>94f48ef -
feat: cite TuringDNA (turingdna.com) in every tool's methods paragraph
Tengo Gzirishvili +1: Claude Opus 4.8The methods/citation box (DE, CRISPR, Primer, Plasmid — all via tdRenderMethods) cited the underlying papers but not the platform. Append a platform citation so a researcher's Methods section credits TuringDNA: "Analyses were performed with TuringDNA (turingdna.com)." Rendered as a link; stripped to plain "turingdna.com" in the copy-paste text. One change in tdRenderMethods covers all four tools. Cache-buster -> v=20260607-cite. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>b465637 -
ui: restyle policy notice to blend with the theme (was a pale bar in dark mode)
Tengo Gzirishvili +1: Claude Opus 4.8The notice used var(--ink) as its background — but --ink is the LIGHT text colour in dark mode, so it rendered as a pale bar clashing with the dark UI. Restyle to the .research-strip register: theme-aware surface (--bg-subtle), soft text (--ink-soft), hairline rule, inset accent stripe, and a chrome-style "Got it" button. Blends in both light and dark. Cache-buster -> v=20260607-noticeui. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>92ef1c5 -
perf: throttle + pause the living-logo animation (laptop fans)
Tengo Gzirishvili +1: Claude Opus 4.8initPlasmidLogo ran an UNTHROTTLED infinite requestAnimationFrame doing ~264 shadow-blurred canvas strokes per frame — at 60/120Hz that pegs a CPU core and spins fans, and it never stopped (background tab, off-screen sidebar). Now: - cap to ~30fps via a time accumulator (2-4x fewer expensive frames) - pause entirely when the tab is hidden (visibilitychange) or the logo is scrolled off-screen (IntersectionObserver) - reduced-motion still draws one static frame Verified in preview: draws << raw rAF when visible; 0 draws when off-screen. Cache-buster -> v=20260607-perf. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>0c44e17 -
fix: policy notice [hidden] override + cache-bust v2
Tengo Gzirishvili +1: Claude Opus 4.8`.policy-notice{display:flex}` beat the UA `[hidden]{display:none}`, so the notice bar stayed visible after "Got it" and on reload despite hidden=true (same class of bug as the export-menu dropdown). Add `.policy-notice[hidden] {display:none}`. Verified in preview: fresh→shows, dismiss→display:none/height 0 /persisted, reload→stays hidden, no console errors. Cache-buster → v=20260607-policy2. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>f3bb46d -
app: reflect data-policy v2.0 (aggregated model improvement)
Tengo Gzirishvili +1: Claude Opus 4.8Privacy/Terms v2.0 (effective 2026-07-07) narrows the no-training promise to INDIVIDUAL content only and permits aggregated, de-identified model improvement. App surfaces updated to match (individual sequences still private/never exposed): - run card sub-copy, workbench "how it works" note, footer → accurate aggregated-only framing + Privacy/Terms links - one-time dismissible material-change notice bar (#policyNotice; localStorage 'td_policy_v2_ack'), shown until acknowledged - cache-buster → v=20260607-policy No engine/algorithm changes. Legal source docs + landing HTML are uploaded to Hostinger separately. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>f94392e
-
Learning flywheel v1: Directed-Evolution active-learning loop (DBTL)
Tengo Gzirishvili +1: Claude Opus 4.8The first durable-moat feature: TuringDNA learns from a researcher's wet-lab results to design a smarter next round, on data no competitor has. Scoped to Directed Evolution (the only tool with quantitative per-variant fitness). Surrogate (dee/core/active_learning.py): additive ridge over single-site effects with the ESM-2 ΔLL as the prior — y ≈ b + w_prior·ΣΔLL + Σβ_m. Fit closed-form in numpy (no sklearn/scipy needed) on the user's measured variants; β shrinks unseen mutations to the prior; an exploration bonus rewards under-tested positions. Plugs straight into the existing additive SA: round 2 re-runs evolve() with per-mutation score = w_prior·ΔLL + β + κ·uncertainty. Numpy-tested: measured data overrides a misleading prior (Spearman 0.77), 0 labels → pure prior, <4 → honest fallback. Backend: migration 0007_de_outcomes.sql (USER RUNS IT); auth.py save/list/cleanup_de_outcomes; /api/de/outcomes (POST/GET) + /api/de/round2 (score WT → fit surrogate → evolve adjusted pool → assemble…26914b4 -
Port methods paragraph + Primer export; adversarial audit fixes
Tengo Gzirishvili +1: Claude Opus 4.8Cross-pollination (DE → other tools): - "Materials & methods (copy-paste)" paragraph + run-parameter pills now render on CRISPR, Primer Analysis and Plasmid Editor (shared tdRenderMethods() helper, reuses .run-meta CSS + wireCopyButtons). Citable, paste-ready. - Primer Analysis export: new /api/primers/export (CSV + .xlsx via openpyxl, sign-in gated, client posts the held result) + an Export menu in the results head. Primer Analysis had no export before. Adversarial audit (whole platform): - FIXED (high): stored/reflected XSS — the methods paragraphs interpolated user-controlled strings (sequence identifier, primer name, plasmid name; can arrive via a pasted FASTA header or an imported GenBank file) raw into innerHTML. Now escaped (escapeHtml/esc) in all four builders, incl. the pre-existing DE runMeta wtId. - FIXED (low): /api/preview 500 returned the raw exception string to the client (confusing + minor internal leak) → generic message; detail still logged. - Verif…7446d10
-
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 -
First-timer UX: identifier fix + goal router + contextual topbar + results key
Tengo Gzirishvili +1: Claude Opus 4.8Bug — sequence identifier showed random letters: Raw (non-FASTA) pastes/uploads fell back to the temp-file stem (tmpXXXX) as their identifier; only sequences pasted WITH a > header (e.g. GFP) worked. Added _humanize_paste_name + _clean_record_identifier (server.py) at both parse sites → raw paste = "Pasted sequence", upload = the real filename, FASTA/GenBank names untouched. UX (the three parked first-timer wins): - "Start here" goal router: dismissible modal ("What are you working on?" → 4 goals route to the right tool). Auto-shows once after the first-use disclaimer; re-openable from a new "Start here" sidebar item. - Contextual topbar: the vague "Engine" title is now the current tool name + a one-line description, updated per route in showRoute() (sub hidden on mobile). - Inline "How to read this": a collapsed-by-default plain-English score key on the Directed Evolution, CRISPR and Primer results cards (ΣΔLL fitness, CFD self-off, KO/FS/Dominance, Tm/specifici…a5e129b -
Add one-click "Try an example" to every tool
Tengo Gzirishvili +1: Claude Opus 4.8A first-time researcher's fastest path to understanding a tool is seeing it work in one click — but only Primer Analysis and Plasmid Editor had a "Load example". The two flagships (Directed Evolution, CRISPR) had none. - Shared TD_EXAMPLE_GFP_CDS constant: the verified EGFP coding sequence already in the repo (clean single ORF). GFP is the universal teaching target. - Directed Evolution: new "Try an example" button (§1 card header) → loads GFP onto the Paste tab, ready to "Use this sequence". - CRISPR: new "Try an example" button (§1 card header) → loads the GFP CDS as a knockout target, clears the resolve/gene fields, scrolls to Design. - Both populate-only (no auto-run of the slow/gated step), so they behave the same for anonymous trial users and signed-in researchers. - Plasmid + Primer: relabelled "Load example" → "Try an example" + added a tooltip describing each case. Headers wrapped in .card-header-left so the new button right-aligns cleanly (text still stacks). Ve…a9f0d6b -
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 -
Unified "My designs" hub: save every tool, not just CRISPR
Tengo Gzirishvili +1: Claude Opus 4.8"My designs" was CRISPR-only; plasmids lived in a separate list and primer/ evolution results couldn't be saved. Now it's one hub with a section per tool. Backend: - migration 0006_primer_analyses.sql (user runs it) — per-user table mirroring crispr_designs (owner-only RLS, 90-day expires_at). - auth.py: save/list/get/delete_primer_analysis (+ lazy cleanup); list_libraries and library_csv_url (signed, owner-checked) reusing the existing public.libraries + Storage bucket from DE auto-save. - server.py: /api/primers/{save,analyses,analyses/<id> GET+DELETE} and per-user /api/library + /api/library/<id>/download — all sign-in gated + owner-guarded. Frontend: - New #savedModal unified hub (Plasmids · CRISPR · Primer sets · Evolution libraries); each tool registers a reopen fn on window.TDSaved. navMyDesigns, the CRISPR "My designs" button, and the Plasmid "My plasmids" button all open it. - Primer Analysis gains a Save button; evolution libraries list with Download CSV (sign…1ee54b6 -
Workbench hub + full-capability docs + fix stuck toolbar dropdowns
Tengo Gzirishvili +1: Claude Opus 4.8Plasmid Editor becomes the central workbench (per user direction): - Default + first nav item ('plasmid' leads ROUTES; no-hash fallback). - Hub-and-spoke hand-offs: new sendToEvolve() sends a construct/region to Directed Evolution (the missing third leg); "Use in ▾" now lists CRISPR, Primer Analysis AND Directed Evolution; new region "→ Evolve" button. - Editorial "one workbench" home strip in the empty state (type-led, not a SaaS card grid); hidden once a construct loads; reflows 1-col ≤540px. Docs: rewritten from DE-only into a four-tool reference (Plasmid Editor, CRISPR, Primer Analysis, Directed Evolution) with method + citations + honest limits each; broadened local-vs-network + citations. Fix stuck toolbar dropdowns (real root cause): .plasmid-export-menu set display:flex unconditionally, which beats the UA [hidden]{display:none} rule (author > UA) — so menu.hidden=true could never hide them and BOTH the "Use in" and "GenBank" menus sat open + overlapping the moment a con…29f4874 -
Rename vague nav tabs to descriptive tool names
Tengo Gzirishvili +1: Claude Opus 4.8The sidebar tabs read "Design / CRISPR / Primers / Plasmid" — too vague to tell users what each tool does. Renamed (hash routes unchanged, so no routing impact): Design → Directed Evolution (ESM-2 variant-library generator; avoided "Protein Design" since the docs state it is NOT de novo design) Primers → Primer Analysis (it ranks the user's candidate primers, not de novo design) Plasmid → Plasmid Editor CRISPR → unchanged (already recognizable) Aligned the hero titles + members-only modal + plasmid→primer handoff labels/toasts so the page no longer says "Primer Picker" / "Plasmid Studio" while the tab says the new name. Bumped app.js cache-buster to v=20260604-names. Verified in a real browser: labels render, no sidebar overflow at 232px, hash routing + active-state still correct, zero console errors. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com…93b09d3 -
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
-
Adversarial audit of Plasmid Studio: fix XSS, DoS, and input-validation gaps
Tengo Gzirishvili +1: Claude Opus 4.8Findings + fixes from a full security/robustness pass over M1–M5: 1) Stored XSS (HIGH) — a feature `color` was injected unescaped into an inline `style="--featc:…"` (sequence view), so a saved plasmid whose feature colour broke out of the attribute (`red" onmouseover=…`) ran script on reopen. Fix: client only emits a validated hex colour into any SVG/style attr (pmColor gate); server sanitize_features() forces every stored/exported colour to a safe hex. Verified live: a malicious saved plasmid renders inert (handler never fires) on map, swatch, and sequence views. 2) DoS — find_orfs was O(n²): a long, ATG-rich, stop-less paste pinned the worker. Rewrote to a single linear pass per frame + an ORF cap. (120 kb stop-less input now returns in <2 s vs many seconds.) 3) DoS / crash — unbounded inputs: - parse_plasmid now rejects import text > 2 MB before parsing; GenBank feature parse capped at 5,000. - sanitize_features() clamps coords to [0,len], drops…d67ba8e -
Plasmid Studio M5: hand a construct (or region) to CRISPR + Primer Picker
Tengo Gzirishvili +1: Claude Opus 4.8The integration that makes the suite more than separate tools — from a loaded or assembled plasmid you can jump straight into guide design or primer checking with the sequence already in place. - Toolbar "Use in ▾" (whole plasmid): "CRISPR guides" prefills #crisprInput + routes to #crispr; "Primer Picker (template)" prefills #primerTemplate + routes to #primers. - Sequence editor "→ CRISPR" / "→ Primers": same hand-off but for the CURRENT selection (From/To, Find, or click-a-feature) — design guides for just the inserted gene, or check primers that flank a feature. - Drives the other controllers through their public inputs (set value + fire 'input' so the CRISPR base-ruler/stats react), then routes via the hash; a toast confirms what was loaded. CRISPR ≥23 bp guard. Frontend-only; 201 pytest still pass. Verified live: whole-plasmid → CRISPR (1,201 bp, base-ruler rewrap, content correct) + Primer template (1,201 bp); region 100–159 → both tools receive exactly 60 bp; navig…8803cb4 -
Plasmid Studio M3 + M4: sequence editor + cloning simulation
Tengo Gzirishvili +1: Claude Opus 4.8M3 — Sequence editor (new "Sequence" view tab): - Feature-colored sequence with position ruler; runs grouped by feature so even big plasmids render cheaply (capped at 60 kb). - Find (forward + reverse-complement) with match count + next/prev, highlights + jumps; selection via From/To coords or clicking a feature. - Operations on the selection: Copy, Copy rev-comp, Translate (client genetic code), Annotate (add a feature), Delete, Insert at position, Reverse- complement the whole plasmid. Edits rewrite the sequence, REMAP feature coordinates (delete/insert shift, revcomp flips), and re-scan restriction. M4 — Cloning simulation (dee/core/cloning.py + /api/plasmid/clone + "Clone & assemble" panel): - Gibson / overlap assembly: auto-orders fragments by terminal overlap; native overlaps assemble scarlessly, bare junctions get homology arms DESIGNED into per-fragment primers (annealing core via the codon engine + the neighbour's tail). Circular or linear. - Golden Gate (Type…ec0167c -
Plasmid Studio (M1+M2): import/annotate/map + restriction/digest + library
Tengo Gzirishvili +1: Claude Opus 4.8New "Plasmid" tool — a Benchling/SnapGene-style plasmid design studio, built on primitives we already had (Biopython GenBank I/O + 1,088 REBASE enzymes, ORF detection, Supabase per-user save). Sign-in gated like CRISPR / the Primer Picker; per-user library from day one. Core (dee/core/plasmid.py, fully unit-tested): - parse_plasmid: GenBank / FASTA / raw DNA → one normalized model {name, sequence, topology, gc, length, features[]}. - auto_annotate: ORF detection + curated motif library (T7/T3/SP6/M13/lac/His) when a record has no features; GenBank features kept as-is. - build_genbank / build_fasta export. - restriction_analysis: per-enzyme cut sites over the common set (or any), circular-aware, classified single/double/multi/non-cutters. - digest: combined cut positions → fragment sizes (circular wraps the origin). API (server.py, sign-in gated): /api/plasmid/import, /restriction, /digest, /export, plus the library: /save, /library (list), /library/<id> (get/delete). auth.py: s…be23b1b -
Primer Picker: add strict 3'-end matching knob for the specificity scan
Tengo Gzirishvili +1: Claude Opus 4.8Off-target predictions are *priming sites*, not guaranteed amplicons — and whether a polymerase extends is governed by the 3' terminus. This adds an opt-in stringency control: when on, an off-target priming site only counts if its 3'-terminal 5 bases match the subject perfectly (no mismatch, no gap), trimming borderline sites that share a body but mismatch at the 3' end. - server.py: _three_prime_clean() inspects the tail of the BLAST alignment strings (match/query/sbjct); _hsp_to_event(strict_3p) rejects a hit whose 3' end isn't clean. PrimerJob.three_prime_strict; /api/primers/analyze accepts `strict_3p` (folded into the cache key). Degrades to lenient if the alignment strings aren't present. - Frontend: "Strict 3'-end matching" sub-toggle under the organism selector (shown with the scan), sent as strict_3p. Default off = catch borderline sites too (safer for screening); on = fewer, higher-confidence predictions. Tests: _three_prime_clean (perfect / 3'-mismatch / within…438edb5 -
Primer Picker: separate intended product from off-targets; collapse redundant hits
Tengo Gzirishvili +1: Claude Opus 4.8Live test surfaced a real problem: running the GAPDH/ACTB primers against Human reported "60 unintended products" and branded a perfectly specific pair with "38 off-target products." Those weren't off-targets at all — `nt` holds dozens of redundant GAPDH records, so the ONE intended 197 bp amplicon was counted once per database entry. That's the opposite of helpful. Fix (rank()): - Collapse in-silico PCR hits that are the same primer pair at the same size (±5 bp) into ONE distinct amplicon, with a "seen in N records" count. - Classify distinct amplicons: a detected F/R pair's amplicon at its expected size (on-template size when given, else the pair's dominant size) is the INTENDED product; the same pair at a different size (e.g. a pseudogene) or any cross-/unpaired combo is a genuine off-target. - Per-primer off-target count now counts only true off-target distinct amplicons, so fitness + chips stop punishing specific primers. Frontend: results now show an "Intended product…7df48f4 -
Primer Picker: full in-silico PCR specificity — no more "go to NCBI Primer-BLAST"
Tengo Gzirishvili +1: Claude Opus 4.8The footer used to send users to NCBI Primer-BLAST to finish the job, which defeats the point of an in-house tool. The reason was v1 only counted per-primer matches, not the paired off-target AMPLICONS that Primer-BLAST uniquely finds. Now we do that check ourselves so the workflow is complete here and the user never leaves. - core/primers.py: insilico_pcr() pairs every forward-oriented priming site with every downstream reverse-oriented site on the same subject within MAX_PRODUCT (4 kb) → predicted PCR products, exactly like Primer-BLAST's specificity step. rank() now folds off-target *product* counts (not raw match counts) into fitness + reasoning and surfaces the product list. - server.py: _hsp_to_event() converts a BLAST HSP to a 3'-anchored priming event (strand from sbjct_start/end; rejects 5'-only / low-identity hits); _run_primer_blast() builds events across ALL primers, runs in-silico PCR, and attributes products per primer. Adds organism targeting (entrez_query…eeea851 -
Gate the Primer Picker behind sign-in (mirror CRISPR)
Tengo Gzirishvili +1: Claude Opus 4.8The /api/primers/analyze endpoint was already sign-in gated server-side (403 signin_required for anonymous). This adds the matching front-end gate so the tool is consistently members-only: - Extend the proactive tab-click hook to a[href="#primers"] (alongside #crispr): an anonymous user clicking the Primers tab gets the dismissible sign-in modal, same as CRISPR. - analyze() already dispatches td:signin-required on the backend 403; now it also surfaces a one-line banner so a user who dismisses the modal still sees why nothing ran. - Generalise the shared #crisprSigninModal copy to cover both tools ("These tools are members-only" · names the CRISPR designer + Primer Picker), keeping the 90-day-save promise scoped to CRISPR only (honest — primers aren't persisted). Verified in-app: anonymous → clicking the Primers nav opens the modal; the td:signin-required (403) path opens it too; signed-in users analyse normally. Cache-buster → v=20260603-primersgate. Co-Authored-By: Cl…73c780f