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
-
Reliability: bake ESM-2 weights + bound in-memory jobs/rate-limit
Tengo Gzirishvili +1: Claude Opus 4.8Three audit quick-wins: - Dockerfile: HF_HOME moved to a BAKED /opt/hf-cache and the default ESM-2 (35M) weights are prefetched at build time, so a cold start no longer re-downloads them (HF_HOME used to live under ephemeral /tmp). Best-effort prefetch (|| echo) so a build-time hiccup can't break the image — it just lazy-loads at runtime. - server.py: cap _JOBS at 2000 and evict the oldest (with their edit locks) so a long-lived worker can't grow unbounded. - server.py: the rate-limit table now evicts the STALEST buckets when it gets large, instead of clear()-ing the whole thing (which reset every honest user's window and could be abused by a unique-IP flood). Verified: 324 tests pass; _JOBS cap evicts oldest + prunes locks; rate-limit drops stalest buckets (recent kept), no global wipe. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>843e792 -
Reliability: run on gunicorn (auto-restart) + add /healthz
Tengo Gzirishvili +1: Claude Opus 4.8The biggest "trust = uptime" fix from the audit. The Space ran on Flask's dev server (Werkzeug) with no supervisor — one unhandled error downed it until a manual reboot. Now it runs under gunicorn: - Dockerfile CMD → gunicorn dee.server:build_app(), ONE gthread worker (state lives in-process: jobs, sessions, rate-limit, the cached scorer — so a single worker is required), 8 threads for concurrency, 120s timeout (the model load runs in a background thread so requests stay fast). The master auto-restarts the worker on a crash → an error no longer takes the whole Space down. - server.py: extract build_app() (logging + off-target prewarm + create_app) as the shared WSGI entry; serve() reuses it for local dev so both paths behave identically. Add a no-auth /healthz liveness route for an uptime monitor. - requirements.txt: add gunicorn. Verified locally with the exact prod invocation: 324 tests pass; gunicorn boots gthread/1-worker; /healthz -> 200 {"status":"ok"}; / -> 200. C…1259937
-
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 -
Plasmid: richer common-features auto-annotation (SnapGene-style)
Tengo Gzirishvili +1: Claude Opus 4.8Expand the _MOTIFS library from 8 → ~22 curated, highly-specific signatures so pasted/raw plasmids auto-annotate like Benchling/SnapGene: sequencing-primer sites (CMV-fwd, BGH-rev, M13), epitope/purification tags (His ×2 codon variants, FLAG ×2, HA, Myc, Strep-II, V5, T7), recombination sites (loxP, FRT, attB1/B2), plus the existing promoters/terminator/lac operator. All matched on both strands by find_motifs (exact, ≥18 bp → no false positives). GenBank imports keep their own curated features; this enriches the bare FASTA/raw case. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1755b9c -
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 -
Security hardening: RLS-as-user, rate limiting, headers, PII + endpoint cleanup
Tengo Gzirishvili +1: Claude Opus 4.8Defense-in-depth pass so a single mistake or leak can't expose user data: - RLS enforcement: per-user reads/writes now run AS THE USER (anon apikey + the requester's verified JWT) so Postgres RLS enforces row isolation — a forgotten user_id=eq. filter can no longer leak another user's rows. New _user_pgrst_headers() with graceful fallback to the service key when SUPABASE_ANON_KEY is unset (reversible rollout). Background workers and the genuine cross-user aggregates keep the service key. - user_id chokepoint: reject any JWT whose `sub` isn't a UUID (closes PostgREST filter-injection via a crafted sub at the single entry point). - Rate limiting: in-process per-(client,rule) sliding window on /api/* with 429 + Retry-After; bounded memory, fail-open, env escape hatch. - Security headers: X-Content-Type-Options, Referrer-Policy, Permissions-Policy, HSTS, and CSP frame-ancestors allowlisting turingdna.com (iframe-safe). - PII minimization: store only a /24-anonymized IP + s…702b153 -
chore: strip internal HTML comments from the served app page
Tengo Gzirishvili +1: Claude Opus 4.8A user opening dev tools on /app/ could read internal engineering notes embedded as HTML comments. server.py now serves index.html with HTML comments stripped + inline JS/CSS minified (_clean_html, cached by mtime, graceful raw fallback) — the commented SOURCE stays for devs, the SERVED page carries none. Verified: served "/" has 0 HTML comments, inline scripts still valid, internal notes (Phase/anti-FOUC/etc.) gone, engine elements intact. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>cb5e8ef
-
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: richer DE aggregate — substitution × ESM ΔLL bin (opt-in, gated)
Tengo Gzirishvili +1: Claude Opus 4.8aggregate.py: keys can carry an ESM-confidence bin → (wt, mut, bin); bin_ll() buckets the wild-type-marginal ΔLL (lo/mid/hi). build_priors gains an optional ll_maps arg (per-library {label: ΔLL}); apply_global_prior is bin-aware, matching each pool mutation's OWN ΔLL bin (free at blend time) and falling back to the unbinned key. Fully backward compatible — no ll_maps ⇒ plain (wt,mut) keys, so existing behavior + tests are unchanged. +4 tests (binning, split-by-ll, blend, serialize). server.py: DE rebuild accepts an opt-in `esm_bins` flag that recomputes ΔLL per library (WT from libraries.wt_protein) — guarded, never runs pre-gate, degrades to unbinned on any ESM failure. auth.py: lib-aware grouping + get_library_wt. Suite 285. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>21b1923 -
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: wire the CRISPR on-target prior into scoring (data-out, guarded)
Tengo Gzirishvili +1: Claude Opus 4.8Completes the CRISPR loop's consumption side. outcomes.py: shared crispr_features (used by both extractor + scorer so keys match), crispr_feature_delta (bounded to ±0.15 of the [0,1] score), and a pure calibrate_crispr_guides (folds the prior in, re-sorts, re-ranks). server.py: cached _load_tool_prior(tool); the /api/crispr/design endpoint now calibrates guides before returning ("calibrated" flag). Strict no-op until public.outcome_priors has a 'crispr' aggregate (post effective date) — verified inert: design returns unchanged scores + calibrated:false. +4 tests; suite 278. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>05da2fa -
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 -
feat: unified outcomes framework — tool-agnostic capture + aggregate + calibrate
Tengo Gzirishvili +1: Claude Opus 4.8The platform-wide version of the DE flywheel so the moat isn't DE-only. One tool-tagged layer any tool plugs into via a ToolSpec; privacy/gating identical for all. - dee/core/outcomes.py: generic engine (ToolSpec registry, within-design standardize, k-anonymity, EFFECTIVE_DATE gate, Prior with blend/serialize). DE registered as first consumer, delegating to the proven aggregate.py — verified DE-through-framework == aggregate.py exactly. - migration 0009_outcomes.sql: generic public.outcomes (tool-tagged, owner RLS, TTL) + public.outcome_priors (tool, feature_key; service-role; CHECK n_users>=3). Leaves the live DE tables (de_outcomes/mutation_priors) untouched. - auth.py: save/list_outcomes, list_all_outcomes_grouped(tool), get/replace_outcome_priors(tool). - server.py: POST /api/outcomes, GET /api/outcomes/<tool>/<design_id>, admin GET /api/admin/priors/<tool> + POST /api/admin/rebuild-priors/<tool> (date-gated). 8 new tests (genericity via synthetic spec, k-anon, gate, …674bee6 -
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: primer/PCR versatility — design, multiplex, local specificity (backend)
Tengo Gzirishvili +1: Claude Opus 4.8Three offline (no-NCBI) additions to dee/core/primers.py + endpoints: - design_primers(): de novo F/R pair design from a template (+ optional target region). Enumerates candidates per flank, scores Tm/GC/clamp/hairpin/dimer, pairs by product size + Tm match + cross-dimer. POST /api/primers/design. - multiplex_check(): pairwise 3' cross-dimers + amplicon size clashes for a primer set. POST /api/primers/multiplex. - local_specificity(): in-silico PCR against a user-uploaded genome/FASTA — runs on our server so primers never leave (unlike the NCBI scan). find_sites gained a max_template override so it scans whole chromosomes. POST /api/primers/local-specificity (<=12 Mb). All sign-in gated; offline so no consent step. 12 new tests (structural correctness, k of geometry, dimer/size detection, off-target copies). Verified via test-client (anon->403; design/multiplex/local-spec happy paths). Suite 264. Frontend UI + virtual gel land next. Co-Authored-By: Claud…867ce54 -
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 -
feat: cross-user aggregate prior (the data moat) — built, run gated to 2026-07-07
Tengo Gzirishvili +1: Claude Opus 4.8Pools wet-lab outcomes ACROSS users into a de-identified substitution-effect prior that nudges round-1 designs. Aggregated-only per the v2.0 policy; nothing attributable to a person. - dee/core/aggregate.py: pool by amino-acid substitution TYPE (positions are protein-specific, so only type generalizes); standardize within each library before pooling (no assay scale/raw value survives); k-anonymity floor of >=3 DISTINCT users; execution gated to EFFECTIVE_DATE (2026-07-07). Folds in via apply_global_prior (additive, same as the per-user surrogate). numpy-only. - migration 0008_mutation_priors.sql: server-only table (RLS, no policies), CHECK(n_users>=3) k-anon guard at the DB layer too. (USER must run it.) - auth.py: list_all_de_outcomes_grouped (the only cross-user read; service-role, pulls just mutations+value), get/replace_mutation_priors. - server.py: admin-token-gated GET /api/admin/mutation-priors + POST /api/admin/rebuild-priors (date-gated → 423 before effective da…3317015 -
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
-
ci: run pytest on push/PR via GitHub Actions
Tengo Gzirishvili +1: Claude Opus 4.8Adds .github/workflows/test.yml — Python 3.12 (matches the HF Space Dockerfile), installs the minimal test deps (biopython/pandas/numpy/flask/ openpyxl/PyJWT[crypto]/pytest) and runs `pytest -q`. torch/transformers are intentionally omitted: the suite mocks / lazily-loads the ESM-2 scorer and never imports them (verified — 241 pass in a clean venv without the ML stack), and those runtime deps are validated by the HF Space Docker build instead. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>e4bdb5a -
test: cover DE active-learning surrogate (Design→Build→Test→Learn)
Tengo Gzirishvili +1: Claude Opus 4.8Adds tests/test_active_learning.py (16 cases) for dee/core/active_learning.py, the round-2 learning core that previously had no committed test: - label parsing (1→0 indexing) + malformed rejection - honest fallback below the measurement floor / with no value spread / empty - headline property: a deliberately anti-correlated ESM-2 prior is overridden by bench measurements (Spearman recovery >0.6, large lift over the prior) - adjust_pool swaps delta_ll into the SA Mutation pool without touching position/wt_aa/mut_aa (frozen dataclass intact) - unmeasured mutations fall back toward the prior, not invented Pure numpy — no torch/ESM needed. Full suite now 241 passing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>2d37996 -
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