Terminal moved behind a Settings → Preview opt-in¶
Motivation¶
The browser terminal is an optional surface, not part of the core BLAST flow.
Previously it was gated only by the build-time VITE_FEATURE_TERMINAL runtime
flag, which defaults to true, so the terminal route, top-nav entry, dashboard
card, results-page CTA, and g t keyboard shortcut were always visible. We want
the terminal to be off by default and surfaced only when a user explicitly opts
in — consistent with the other Preview features (Custom DB, Lab Tools, Live
Wall).
User-facing change¶
- A new Terminal toggle appears under Settings → Preview, off by default.
- With the toggle off, the terminal is fully hidden: no
/terminalroute, no navigation entry, no dashboard Terminal card, nog tshortcut, and the "no result files" panel on the results page no longer offers the terminal CTA. - Turning the toggle on immediately reveals all of those surfaces (stored in this browser only, like the other Preview opt-ins).
- The build-time
VITE_FEATURE_TERMINAL=falseflag still hard-disables the feature even if the toggle is on, matching the Custom DB / Lab Tools pattern.
Terminal Config Builder usability¶
Alongside the gating change, the terminal's own Config Builder form was made less error-prone so the (now opt-in) feature is more usable:
- Program is a dropdown of the five canonical BLAST programs
(
blastn/blastp/blastx/tblastn/tblastx, mirroring the backend^(blastn|blastp|blastx|tblastn|tblastx)$contract) with a short query→database hint, instead of a free-text input that required memorising the exact program name. - Nodes is now a constrained numeric input (
min=1). - The generated
elb-cfgcommand contract is unchanged — the field values are still plain strings flowing throughbuildElbCfgCommand, so the terminal-side helper remains the single source of truth for the INI layout.
Implementation summary¶
web/src/hooks/usePreferences.tsx: addedterminaltoPreviewFeature, apreviewTerminalEnabledpreference (defaultfalse), and wired it intoPREVIEW_PREF_KEYSandPREVIEW_RUNTIME_FLAGS(runtime flagterminal).web/src/components/SettingsPanel.tsx: added the Terminal toggle row to the Preview section.- Swapped
isFeatureEnabled("terminal")forusePreviewFeatureEnabled("terminal")in every consumer:App.tsx,Layout.tsx,KeyboardShortcuts.tsx(shortcuts()now takes aterminalEnabledargument sourced from the hook in both theuseKeyboardShortcutshook and theShortcutsTabcomponent),pages/Dashboard/DashboardGrid.tsx,pages/Dashboard/useGettingStartedReadiness.ts,pages/blastResults/useBlastResultsState.ts, andpages/blastResults/BlastResultsTable.tsx. scripts/e2e/fixtures/uiTest.ts: setpreviewTerminalEnabled: trueso the ui-mock e2e scenarios that exercise the terminal keep their surfaces mounted (also keeps theusePreferences.fixtureContracttest green).web/src/pages/terminal/TerminalCfgForm.tsx: declarativeFieldDescriptornow supportsselect/numbercontrols; Program renders as a dropdown and Nodes as a numeric input. No change tobuildElbCfgCommandor the model.
Validation¶
cd web && npm run build— TypeScript compile + Vite build succeed.cd web && npm test -- --run— 617/617 tests pass, includingusePreferences.fixtureContract.test.tsandterminalCockpitModel.test.ts(30 tests).npx eslinton all changed files — no new errors (one pre-existing unrelated warning inSettingsPanel.tsx).