testing-dyb-pro-ui
How to bring up and end-to-end test the DYB Pro frontend (three-zone workspace) against the local FastAPI backend on Windows, including running real design cycles without a Devin key.
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 27
- Forks
- 1
01 前言 Front Matter
- name
- testing-dyb-pro-ui
- description
- How to bring up and end-to-end test the DYB Pro frontend (three-zone workspace) against the local FastAPI backend on Windows, including running real design cycles without a Devin key.
03 SKILL.md 正文
Testing the DYB Pro web UI end-to-end
Bring up the stack (no credentials needed)
Backend (SQLite fallback, port 8000), from backend/:
$env:ALLOW_LOCAL_SIMULATION="true" # lets a design cycle run without a Devin key (provider badge: local-simulation)
$env:CELERY_TASK_ALWAYS_EAGER="true" # run agent tasks inline when Redis is unavailable
$env:DAEMON_LITERATURE_NETWORK="false" # keep the lab daemon offline; literature calls otherwise hit OpenAlex/Semantic Scholar and are slow/rate-limited
python -m uvicorn app.main:app --port 8000
Interpreter note: python / C:\Python311\python.exe may not exist on the box even if a blueprint
references them. The working interpreter has been C:\devin\python\python.exe - check with
Get-Command python / Test-Path before assuming, and use PowerShell syntax (;, not &&).
npm run start prints a warning that it "does not work with output: standalone"; it nonetheless serves
correctly on :3000. After rebuilding you MUST hard-reload the browser (Ctrl+Shift+R) or you will keep
testing the previously served bundle - an easy way to report a stale UI as the new one.
Frontend (port 3000), from frontend/: npm run dev (or npm run build; npm run start).
Default API key dyb-pro-demo-scientist is sent automatically by the frontend; the other seeded keys
are dyb-pro-demo-admin and dyb-pro-demo-viewer (viewer is read-only, RBAC is enforced).
Redis is often unavailable in the sandbox - CELERY_TASK_ALWAYS_EAGER=true is the workaround.
Caveat: with eager mode the POST /cycles request runs the whole cycle synchronously, so transient
UI states (cycle running..., queued/running agent pills) may flash by or never render; the run
button just stays disabled until the cycle is already committed. To observe live agent-status
transitions, run a real Celery worker + Redis (docker compose up) instead of eager mode.
Seeding data
Click load demo project in the left ASK pane - it seeds and selects "GB1 stability + Fc binding (demo)"
with a full commit history. Reset local state by deleting backend\dybpro.db and backend\artifacts.
A cycle in local-simulation mode adds ~15 commits, so repeated cycles inflate the fold strip quickly
(relevant to the layout bug below).
Useful selectors / handles
- Left pane:
aside[aria-label="ask and agent control"],textarea[aria-label="research brief"],select[aria-label="project"]. Ctrl+Enter in the brief starts a cycle. - Center tabs are
button[aria-selected]with textprotein viewer/version DAG/wet-lab shortlist/observation log; fold strip thumbnails arebutton[aria-label^="version "]inside.thumbs. - Right pane:
aside[aria-label="pixel agent swarm"]. It stays empty ("Run a cycle to watch...") until a cycle has run; withCELERY_TASK_ALWAYS_EAGER=truethe cycle completes synchronously (~30s) so every agent lands ondoneand the intermediatethinking/searching/writingstate colours never render. Run a real Celery worker + Redis if those states must be verified.
Research lab tab (/api/lab subsystem)
- Center tab labelled
research lab; component treeResearchWorkspace->DaemonPane,ResearchFeed,LabelStudio,WetlabLoop,LearnedPaneviafrontend/lib/research.ts. - Handles:
[data-testid=campaign-summary],daemon-refresh,daemon-tick,label-create,wetlab-plan,wetlab-simulate,proposal-refresh,proposal-blocked,seed-campaign. seed-campaigntakes ~1-2 min and is disabled oncedigest.result_count > 0(coded idempotency guard, not a bug). Seed over the API first, asfrontend/e2e/demo.spec.tsdoes, then test the UI state:POST /api/lab/projects/{id}/research/seed-campaignwith headerX-API-Key: dyb-pro-demo-scientist.- Cross-check the UI against the API rather than trusting the rendering:
/api/lab/projects/{id}/research(digest.version_count|paper_count|result_count,learned.drift[],learned.headline),/api/lab/commits/{fullCommitId}/wetlab/plan|results,/api/lab/projects/{id}/research/proposal. Commit ids shown in the UI are TRUNCATED to 12 chars; the lab routes need the full 64-char id, which you can get fromGET /api/projects/{id}/commits(a short id returns{"detail":"version not found"}). - Running a design cycle also feeds the lab daemon (new commits queue
results_registered/version_createdtasks), soqueue/events/knowledge vbadges move - handy for proving the daemon reacts. - Command palette: Ctrl+K (input placeholder
run a command...), type to filter, Enter to run, Escape closes. - Drag-to-compare needs a real mouse down, several intermediate moves, then up on the target thumbnail;
a single
left_click_dragmay not trigger the HTML5 drag handlers.
Things to check that have been broken before
- Horizontal overflow driven by the fold strip.
.thumbsisdisplay:flex; overflow-x:auto, but if any ancestor (.fold-strip,.viewer,.center-body,main) losesmin-width: 0the row stretches the whole page instead of scrolling: with 31 commits the documentscrollWidthwas 3884px at a 1280px viewport. Verify withdocument.documentElement.scrollWidthvswindow.innerWidthafter loading a project with many commits, at both ~1280px and ~1100px widths. Symptom: controls such asexit compareland far offscreen. - Export links. Shortlist
export CSV/JSON/FASTAanchors point straight at the API URL, so the browser navigation carries noX-API-Keyheader and the response is{"detail":"missing X-API-Key header"}. Always click the export control in the UI rather than assuming the link works. (Known open bug.) - Responsive breakpoint: below 1180px the workspace should collapse to a single column
(
grid-template-columnsbecomes one track). MiniBarscharts collapsing in narrow columns..barrowisgrid-template-columns: minmax(96px,148px) minmax(0,1fr) autowith awhite-space: nowrapmono readout, so inside a narrow column (e.g. the 2-col.center-body.labgrid at a 1024px viewport) the fixed name column and the readout eat the row and.bartrackcollapses to ~10-30px, with bar fills under 3px - the chart becomes unreadable even though the numbers are right. Worse, each.barrowis its own grid, so track width varies per row and bar lengths are NOT comparable across rows. Always measure rather than eyeball:[...document.querySelectorAll('.bartrack')].map(t=>t.getBoundingClientRect().width)and compare.barfillstyle.widthpercentages against the API values. Possible fixes to suggest: amin-widthon.bartrack, letting the readout wrap, shrinking the name column, or hoisting the columns onto the shared.barchartgrid so all rows align..center-body.labhorizontal overflow. The 2-column lab grid overflowed by ~61px (scrollWidth 762vsclientWidth 701) at a 1024px viewport, producing a horizontal scrollbar. Checkdocument.querySelector('.center-body.lab')scrollWidth vs clientWidth..tiptooltips carry prose that was deleted from the surface.globals.csshides.tip::afterwithopacity:0; visibility:hiddenand reveals it on:hoverand:focus-visible(spans carrytabIndex={0}). If the tooltip fails, that explanatory text is simply gone, so verify BOTH paths with screenshots: hover and screenshot while hovering; then click the element, move the mouse far away, pressshift+TabthenTab(a plain click does not match:focus-visible) and screenshot the focused state. NotescrollWidthof a.tipelement is inflated by the tooltip pseudo-element, so it produces false "clipped text" positives.
Window resizing on Windows for responsive checks
xdotool is not available; resize Chrome via Win32 from PowerShell
(user32.dll MoveWindow on (Get-Process chrome | ? MainWindowHandle -ne 0).MainWindowHandle),
then ShowWindow(handle, 3) to re-maximize.
Devin Secrets Needed
None - local simulation and the demo API key cover the whole golden path.