Skip to content

Size MCQ dialog to primary usable (multi-image clamp) - #33

Merged
ajlennon merged 4 commits into
mainfrom
feat/mcq-size-smallest-display
Aug 3, 2026
Merged

Size MCQ dialog to primary usable (multi-image clamp)#33
ajlennon merged 4 commits into
mainfrom
feat/mcq-size-smallest-display

Conversation

@ajlennon

@ajlennon ajlennon commented Aug 3, 2026

Copy link
Copy Markdown
Member

Summary

  • Multi-image Gtk MCQs still overflowed: each preview used the full single-image size_request height (~50% usable), so 2–3 stacked stills summed past Framework eDP primary.
  • Opening geometry now prefers the OS primary usable workarea (else smallest) — never largest / never pointer-on-4K.
  • Multi-image stack shares one height budget, lives in a scrolled viewport, and soft-fill maximize stays within usable host workarea.
  • Regression test: fake primary 1803×1202 + 2–4 images → window/stack ≤ primary usable. Docs/skill note the P0 clamp.

Hosts / platforms touched

  • Cursor (Linux Gtk)
  • Claude Code
  • Claude Desktop / other stdio host
  • Windows Phase 1 (tkinter text-only)
  • Docs only (no behaviour change)

Test plan

Check Result Notes
uv run python scripts/test_dialog_ergonomics.py Pass multi-image stack + primary sizing
uv run python scripts/test_mcq_images.py Pass normalize path helpers
ask_multiple_choice after Reload Window Pending text-only confirm clamp; avoid multi-image until reload

Environment: Ubuntu Wayland, Framework eDP-1 primary 1803×1202 + Samsung DP-2 4K; MCP --directory at ask-question-mcp-mcq-small-display.

Behaviour contract

  • No removal/rename of MCP tools without a migration note
  • Cursor absolute-uv docs kept
  • No lab IPs / home paths / secrets in tracked files

AI assistance

  • AI-assisted (Cursor). Reload Window required so the live MCP process picks up this commit.

Made with Cursor

Dual-monitor defaults were taken from the largest Gdk/xrandr mode, so
image MCQs opened at ~72% of 4K and overflowed the laptop eDP. Prefer
the pointer's monitor when known, otherwise the smallest connected
workarea/geometry; maximize stays compositor-local to the host display.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ajlennon
ajlennon requested a review from jackghx as a code owner August 3, 2026 01:13
ajlennon and others added 3 commits August 3, 2026 02:35
Default image-MCQ geometry no longer uses absolute 720×700 floors or a
62% preview that overflows Framework eDP once chrome is counted. Maximize
reflows the still to the host panel and restores the prior size reliably.

Co-authored-by: Cursor <cursoragent@cursor.com>
DEFAULT_DANGER_ARM_MS had stayed at 4000 on main/sizing after the 1s
preference lived only on the unmerged primary-display branch; bring both
arms back to 1000ms without touching sizing/maximize.

Co-authored-by: Cursor <cursoragent@cursor.com>
Stacked previews each took the full single-image height size_request, so
2–3 stills overflowed Framework eDP. Share one stack budget, scroll inside,
and size against the OS primary panel (not pointer/largest).

Co-authored-by: Cursor <cursoragent@cursor.com>
@ajlennon ajlennon changed the title Size MCQ dialog to the smallest display Size MCQ dialog to primary usable (multi-image clamp) Aug 3, 2026
@ajlennon
ajlennon merged commit d59dc31 into main Aug 3, 2026
4 checks passed
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.

1 participant