fullseye

Fullseye Studio — HDevelop Fidelity Spec (North Star)

日本語 · English

Goal = make Fullseye Studio (studio.py) an image-processing IDE faithful to MVTec HDevelop. Principle = “the IDE screen is simple yet multifunctional,” “high information density” (user, 2026-08-15, [[feedback_ide_design_simple_multifunctional]]). This document is an implementation spec spanning multiple sessions. Each session reads this and continues implementing.

Primary sources (always corroborate against these)

HDevelop model (Perplexity research summary; verify against official docs)

Windows (each functions as “one self-contained piece of software”; buttons are compact icons; right-click for a context menu)

How iconics are produced and checked

Control flow / script syntax (HALCON Script)

Current Studio → HDevelop gap & roadmap

Evolve in stages from the linear a/b pipeline (a sequence of op,a,b) toward the HDevelop model of variables + control statements + typed arguments.

Implementation discipline

Top priority for next session (found during the live GUI review, 2026-08-15)

  1. ★Autonomous UI-operation debug harness: use QTest to inject real mouse click/press/move/release into every button/drag, automatically catching operational crashes and defects without making the user touch them. Procedure: build_window(offscreen) → QTest.mouseClick every QPushButton/QAction → dock drag → screenshot + state assert at each stage. Calling handlers directly misses bugs specific to real events (e.g., the old GroupedDragging segfault).
  2. Current-image display-window model (HDevelop): at least one image display window is always resident (the last one cannot be closed) = the “current window.” Double-click display of a variable/object goes to the current window (currently new window/main are separate). Unify new_graphics_window/display_variable under the current-window concept.
  3. Fixed (this session): the bug where step execution did not update the display (step_to made self-healing). HDevelop-style default layout. Button icon + label. Persistent crash log.
  4. Verification discipline: before making the user test manually, I verify e2e in a sandbox (QTest + screenshots) (explicit user instruction).
    • Note (HDevelop): each Graphics window has a handle number (the WindowHandle of open_window/dev_open_window). The dev_* operators (dev_display/dev_set_color/dev_set_draw/dev_clear_window, etc.) draw to the current window. dev_set_window(Handle) switches the current one. → Studio implementation: a handle number per graphics window + a current-window pointer + variable double-click = draw to the current window + a current-switching UI (click a window or specify a handle).

Implementation record: v18.8 (2026-08-15, Opus5[1m]/ultracode) = autonomous UI-operation debug harness + 3 crash-class bug fixes

★Implemented the autonomous UI-operation harness (tools/studio_ui_harness.py). It launches Studio in an offscreen subprocess and injects real mouse events (QMouseEvent sent directly = drag keeps buttons=LeftButton) into every QPushButton / every QAction / every dock drag / the variable list / right-click context menus (183 steps across P0–P9). Design:

★The harness auto-detected → I fixed 3 crashes that only appear under real event injection (all in studio.py, with regression tests in tests/test_studio.py):

  1. [High] Access violation (segfault) on the 3D surface button. Q3DSurface() in show_3d_surface (formerly line 737) native-segfaults when no OpenGL context exists (offscreen / Remote Desktop / software GL); the try/except only caught import failures. → Gate it with _opengl_available() (a QOffscreenSurface+QOpenGLContext probe; offscreen is immediately False), and open_3d flashes “3-D surface needs OpenGL” when it is None. It works if GL is present / degrades harmlessly if not / never crashes.
  2. [High] update_actions raised RuntimeError on a deleted widget. b_save (Save result) lives inside image_panel (= the primary Graphics window) and is deleted when the window is destroyed, but a queued currentRowChangedupdate_actions hits setEnabled with RuntimeError: Internal C++ object already deleted. → An _enable(cond, *widgets) helper skips deleted ones (state sync continues for the survivors).
  3. [High] The primary Graphics window was closed, destroying the resident view + global operation buttons (= the real crash of Codex #2 below, “no resident model where the last window can’t be closed”). Closing an MDI subwindow (close button / system-menu “Close” / Ctrl+W) destroyed view/b_save along with image_panel. → A close-rejecting event filter on the primary subwindow (_ResidentCloseGuard) + detach_graphics refusing to detach the primary (objectName == "graphics_primary"). The first step toward the resident current-window model.

Verification = re-running the harness: all 183 steps OK, 0 slot exceptions, 0 crashes, and the primary window stayed alive+in-MDI across all 10 phases (before the fix, the MDI “Close” in P2 made in-MDI=False → deleted in P9 → crash). Studio tests 69 → 72 (updated the detach test to the resident spec + added 3 regressions for resident/update_actions/3D). Dock drag (suspected GroupedDragging) did not crash across all 25 patterns (the automated proxy passes; since it differs from the real windowing-system native drag, on-device confirmation is separate).

Operation-model spec and deliberation (2026-08-15, external AI = Codex read-only; user instruction: “have it critique while considering the use case”)

Use case = design work to “interactively compose an image-processing algorithm, tune parameters, and validate on holdout” (an HDevelop-experienced user expects an equivalent feel). I had Codex read studio.py + this doc and obtained 12 code-backed critiques limited to operation flow (I verified each against the primary code. Discipline = no blind acceptance [[feedback_external_ai_verify]]). Adopted points (★ = next implementation target):

Deliberated implementation order: (P4-current) the current-window model ← foundation already laid by the resident work, threading the largest cluster (Codex #1–5) at once → (P2b’) per-op argument UI → (step linkage) → (Program dirty tracking). Undo / holdout path are large-scope, so after user confirmation.

Addendum: current-Graphics-window model (P4-current) implemented (v18.8, this session)

Addendum: per-op argument UI (P2b’, Codex #6) implemented

Addendum: default layout toward image-first (user guidance 2026-08-15)

User guidance = “the image is largest / then the script code / op-selection and variable windows are vertically small / mostly undocked, shown only when needed.”

Addendum: implementing the remaining Codex findings (user chose all 4 items, 2026-08-15)