Skip to content

Desktop workbench overhaul: toolbar options, input/constants/result redesign, design-token pass - #84

Open
yilibinbin wants to merge 139 commits into
mainfrom
feat/toolbar-options-popup
Open

Desktop workbench overhaul: toolbar options, input/constants/result redesign, design-token pass#84
yilibinbin wants to merge 139 commits into
mainfrom
feat/toolbar-options-popup

Conversation

@yilibinbin

@yilibinbin yilibinbin commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

Desktop GUI overhaul for DataLab's workbench: toolbar-driven options, a redesigned
input/constants/result layout, on-demand LaTeX, a full design-review token pass, plus a
batch of UX polish and bug fixes accumulated on this branch. One Python core, two frontends
— desktop changes only; the web app and compute layers are untouched.

Highlights

Layout / workbench

  • Two-pane workbench (config+data | result) with a result-heavy ~1:3 default ratio.
  • Input data + constants merged into 输入数据 / 常数 sheet tabs; each tab self-contained.
  • Input-area expand/collapse toggle with a smooth 220ms splitter animation.
  • Left column unified into [输入数据] + [one config card] per mode; mode selector on the toolbar.
  • Result overview → compact clickable toolbar status chip; history moved to a toolbar popup.

Input / constants UX

  • Removed the 使用数据文件 checkbox — a non-empty file path now takes precedence over the
    manual editor (which greys/hides live when a path is entered). Same for constants.
  • Constants card gained a 输入常数 title, an N 行 row-count, and a ? help button (matching the
    data card); both input cards now carry a consistent border + padding.
  • Excel-like block copy (Ctrl/Cmd+C → TSV) in the data/constants tables.

LaTeX / result

  • On-demand 生成 TeX / 预览 PDF (no generate-checkbox); tex-rebuild inputs persist in the
    workspace so it works after reopen without recomputing.
  • 不确定度位数 moved to the result panel with live re-render.
  • Fitting model line honours the digit / scientific toggles; long compile-error dialogs no longer
    push OK off-screen; result font-size control live-updates.

Feature removal

  • Removed the 单位标注 (units) feature end-to-end on the UI side (not general enough); the
    display-only backend is left as harmless dead code and old workspaces still open.

Design-review token pass (theme.py)

  • Converged 3–4 near-duplicate hexes per role into semantic tokens
    (text_primary/text_muted/border/card_bg/region_bg/surface_raised/surface_hover).
  • Radius collapsed to a 2-tier scale (RADIUS_CARD=8 / RADIUS_CONTROL=6); one canonical
    CARD_PADDING; formula-preview border fixed; fixed-white tutorial card text pinned dark.

Precision / workspace correctness

  • Lossless mpf workspace serialization (was two-sided precision loss on reopen).
  • Guarded workspace capture against missing data/constants files.

Review gates already passed on this branch

  • Three-model serial adversarial review (Claude → Codex → Gemini) across multiple rounds;
    all confirmed findings fixed (mpf precision, theme-toggle stale styles, animation-fight,
    tutorial contrast, file-precedence live feedback, …). Gemini's agy channel timed out on the
    last two rounds — its lens was covered by direct code inspection and noted as such.
  • /simplify 4-agent cleanup pass (reuse / simplification / efficiency / altitude): radius
    convergence finished, per-keystroke constants refresh gated, dead widget removed.
  • Iterative user acceptance on the live GUI throughout.

Test plan

  • QT_QPA_PLATFORM=offscreen pytest -q — full suite green (a couple of files run separately due
    to an offscreen Qt-teardown hang unrelated to these changes).
  • Per-round targeted suites (theme tokens/spacing, two-pane layout, input/constants tabs,
    constants editor, formula preview, workspace controller, option reachability) all pass.
  • Regression tests added for: file-precedence dimming, expand/collapse restore, formula-preview
    pixmap inset, constants row-count + control-row placement, theme-toggle restyle, mpf round-trip.

Requesting

CodeRabbit review before merge to main.

Summary by CodeRabbit

  • New Features
    • On-demand LaTeX generation with a non-modal preview dialog (TeX source + compiled PDF).
    • History panel now collapses by default, with a toolbar popup; added a compact result overview popover and an always-visible result status strip.
    • Desktop toolbar option controls now open real non-modal dialogs.
  • Bug Fixes
    • Excel-like block copy (Ctrl/Cmd+C → TSV) for table selections; improved formula preview border visibility and refreshed embedded constants/editor styling.
    • Web: fixed docs TOC heading anchors; added rate-limiting for heavy compute POST requests.
  • Refactor
    • Merged two-pane workbench layout with improved resize/height behavior.
    • LaTeX numeric digit grouping supports native vs app-side grouping (engine-adaptive where available); removed TeX/PDF result tabs.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants