Repository navigation
Open a script app at its manifest's window size; PDF Tools asks for 1536 x 1024 - #478
Merged
Merged
Conversation
…536 x 1024 The desktop opened every app at 72% x 76% of the desk, at most 1000 x 720 points, and an app had no way to ask for more. PDF Tools v2 was designed at 1536 x 1024, so its Combine button and Home captions fell below the fold. App Hub's contract 1.12.0 (App Hub #207, merged as d86101d7) adds the optional manifest field `window`, a hint that grants nothing, which needs schema_minor 1. Repin App Hub to d86101d7: the four App Hub crates, the [patch.crates-io] contract line and native-apps.json's App Hub source; in Cargo.lock only the five App Hub source lines and the contract's 1.11.0 -> 1.12.0. The workspace's contract requirement moves to "1.12", since the shell now reads `manifest.window`; Rinx and every other member still resolve to one contract. The shell: when the desktop opens a window for a script app, system or installed, `apps::window_hint` reads `window` from the bundle the Card runner opens (a system app's admitted build, unpacked now on its first launch, or the installed bundle), and `WmLayout::insert_sized` opens the window at `desktop_layout::preferred_size`: that size, clamped to the desk minus the margins new windows keep (42 points left and right, 32 top and bottom), never below the 80 x 60 a resize drag leaves, placed as every window is (42/32 in, cascading 30). Without a hint, and for every other module, the default rule is unchanged. Phones ignore it. The resize drag now names the same minimum constants. Native modules' own window size requests (`WindowRequest::Open { size }`) are still ignored. PDF Tools sets "schema_minor": 1 and "window": {"width": 1536, "height": 1024}. Tests: the default size is unchanged, a desk larger than the hint opens it at its size, a smaller desk clamps it to the desk minus the margins, a tiny desk never goes below the minimum; window_hint reads a packed system app, an installed bundle, no hint, a refused manifest and a non-script app; the build's packed PDF Tools and the shipped manifest ask for 1536 x 1024. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PDF Tools' README (English and Chinese) said the desktop opens every app at the default 72% x 76% of the desk and that an app could not ask for more. It now says the manifest asks for the designs' 1536 x 1024, how the desk clamps it, what a hidden shell measured, and that the modes were not re-run at the new size. The code walkthrough describes how a script app's window gets its size, and the apps guide lists `window` among a bundle's manifest fields, in both languages. Evidence (tests/evidence/window-20261010): a hidden desktop shell built from 587aefd, PDF Tools opened from the shell's menu once the desk had drawn. The 1400 x 899 shell has a 1380 x 847 tile area, and the window opens at 1296 x 783 points, 42 in left and right and 32 top and bottom, an app area of 1292 x 747; before, the default window gave 990 x 603. One /g grab at one pixel per point, and a receipt with the binary's digest. Opened at startup through MAKEPAD_WM_TEST_APP it was 1296 x 776, sized on the shell's startup proportions as every window opened then is. The OctoSense style's dock overlays the desk, so the window's lowest points sit behind it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… desk
OctoSense's and macOS's docks float over the bottom of the desk and reserve
no strip, so a window clamped to the desk minus its margins had its lowest
points behind the dock: about 45 points of PDF Tools' window, where its
zoom bar and its status line ("Saved", storage use) sit.
`desktop::dock_overlay` says how many points of the work area's bottom the
dock covers, from the shelf's own geometry for the style the tween is
heading to: 78 for macOS and OctoSense, 0 for Windows (whose taskbar
reserves its strip), NeXTSTEP, Omarchy and the phone rows.
`desktop_layout::preferred_size` clamps the hint to the room above the dock,
less the usual margins, so the window ends 32 points above the dock; the
hint path's placement uses the same room, so a cascaded window moves up
instead of down behind the dock. Default-size windows and the shell's own
maximize are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
apps/pdftools/tests/ui.py's `shell` run, unchanged, light and then dark, in a hidden desktop shell built from 487c79d with the dock margin: the window opened at 1296 x 698 (on the startup proportions), the app had 1292 x 662, its wide layout, and every step of both passes passed with the real pdf engine at the runtime's 64 ms budget, with no script errors and a clean /quit. Frames of the app's area (one pixel per point) in tests/evidence/window-20261010/wide/: Home, Reading, Find, Comment with a highlight, Combine before and after one scroll, Edit, and Reading in the dark pass. In every frame the status line and the zoom bar sit above the dock. Opened from the shell's menu on a drawn desk, the window is 1296 x 703, 32 points above the dock (opened-from-the-menu.png, the whole hidden window). What the run showed, recorded in the receipt and the READMEs: at this 898-point-tall window, with two PDFs listed, Combine's own button is 85 points below the fold (one scroll shows it), and Home's last caption line sits at the fold. Keeping the window above the dock costs 78 points of height here; before that change both fitted or nearly did. The PDF Tools README (English and Chinese) gives the new size, the wide layout and these limits; the code walkthrough describes the margin kept above a dock that floats over the desk. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ymote
force-pushed
the
feat/app-window-hint
branch
from
October 11, 2026 02:47
487c79d to
d28f3f7
Compare
ymote
marked this pull request as ready for review
October 11, 2026 03:04
Contributor
Author
|
Local CI passed on d28f3f7 ( GitHub would run for this PR: desktop.yml, phone.yml, apps.yml. Merged on this local pass (macOS runner queue); GitHub CI runs on the merge commit on main.
Skipped (these did NOT pass; (!) marks a skip that blocks tools/ci-local-merge.sh):
Notes:
Native GitHub acceptance passed on the same head: embedded-browser.yml. |
This was referenced Oct 11, 2026
ymote
added a commit
that referenced
this pull request
Oct 11, 2026
…ort window With the desktop's window above the dock (1292 x 662, #478), Combine's own button sat 85 points below the fold with two PDFs listed. Now: - When the list fits, the card is as design 06 draws it. - When it doesn't, a tall card fills the pane. Its title and footer ("One PDF of N pages", Name and the Combine button) stay in view, and the file list scrolls inside it. - The tall card's list is a static scroll view, so it keeps its place while the list is drawn again (adding a PDF, typing its pages). - combine_list_h and combine_fits do the height math from the design's measures, and are model-tested. In the shell's default window (990 x 603): - The Edit panel draws its gaps tighter, so Apply and Cancel stay in view under Alignment and Colour. - Colour's box opens into its seven colours in its own row instead of a row below it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ymote
added a commit
that referenced
this pull request
Oct 11, 2026
…wn size ui.py's shell, restart, full and empty runs, rebased on main with #478. They ran in a hidden desktop shell with the real pdf engine, at the runtime's 64 ms budget, with PDF Tools at its own window size (an app area of 1292 x 662), light and dark. The fixture run used card-host at the designs' 1536 x 1024. What they show: - comment dates in this machine's local time ("Today 20:21" when UTC was 03:21 the next day); - the Edit panel's Alignment and Colour applied by the engine; - the status line from files.status ("187 KB of 64 MB used" for a storage of 191,793 bytes; the PDFs alone are 38,356); - one cover per PDF, kept untouched across a restart; - Combine's own button in view with two PDFs listed (before, 85 points below the fold); - with the storage full, cards that still show their pages and size. The receipt holds the digests, the commands and the numbers. The README's Verified, Not verified and Known say so in English and Chinese. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ymote
added a commit
that referenced
this pull request
Oct 11, 2026
…ort window With the desktop's window above the dock (1292 x 662, #478), Combine's own button sat 85 points below the fold with two PDFs listed. Now: - When the list fits, the card is as design 06 draws it. - When it doesn't, a tall card fills the pane. Its title and footer ("One PDF of N pages", Name and the Combine button) stay in view, and the file list scrolls inside it. - The tall card's list is a static scroll view, so it keeps its place while the list is drawn again (adding a PDF, typing its pages). - combine_list_h and combine_fits do the height math from the design's measures, and are model-tested. In the shell's default window (990 x 603): - The Edit panel draws its gaps tighter, so Apply and Cancel stay in view under Alignment and Colour. - Colour's box opens into its seven colours in its own row instead of a row below it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ymote
added a commit
that referenced
this pull request
Oct 11, 2026
…wn size ui.py's shell, restart, full and empty runs, rebased on main with #478. They ran in a hidden desktop shell with the real pdf engine, at the runtime's 64 ms budget, with PDF Tools at its own window size (an app area of 1292 x 662), light and dark. The fixture run used card-host at the designs' 1536 x 1024. What they show: - comment dates in this machine's local time ("Today 20:21" when UTC was 03:21 the next day); - the Edit panel's Alignment and Colour applied by the engine; - the status line from files.status ("187 KB of 64 MB used" for a storage of 191,793 bytes; the PDFs alone are 38,356); - one cover per PDF, kept untouched across a restart; - Combine's own button in view with two PDFs listed (before, 85 points below the fold); - with the storage full, cards that still show their pages and size. The receipt holds the digests, the commands and the numbers. The README's Verified, Not verified and Known say so in English and Chinese. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The desktop opened every app's window at 72% × 76% of the desk, at most 1000 × 720 points (
crates/shell/src/desktop_layout.rs), and an app had no way to ask for more. PDF Tools v2 was designed at 1536 × 1024, so in that window its Combine button and its Home captions fall below the fold.The decision: apps may ask for a larger desktop window, and PDF Tools uses it. App Hub contract 1.12.0 (App Hub #207, merged as
d86101d7) adds the optional manifest fieldwindow. It is a hint, not a grant, and it needsschema_minor1.What changes
Repin App Hub to
d86101d7(#207's merge commit, which is App Hub main)Cargo.toml: the four App Hub crates and the[patch.crates-io]octosense-app-contractline.native-apps.json: App Hub's source;tools/native_apps.pyregeneratesoctosense-app-hub-appfrom it.Cargo.lock: only the five App Hubsourcelines, plusoctosense-app-contractmoving from 1.11.0 to 1.12.0.octosense-app-contractrequirement moves from"1.11"to"1.12", because the shell now readsmanifest.window. The[patch.crates-io]git source supplies 1.12.0.cargo tree --locked -i octosense-app-contractshows a singleoctosense-app-contract v1.12.0from App Hubd86101d7, used byoctosense-app-policy,octosense-shell,rinx,rinx-miniapp-catalogandrinx-system-apps.apps.yml's check "One Makepad, App Hub, octos and Rinx in the locked graph" passes, and so doespython3 tools/setup.py --check --cargo. Both were re-run after rebasing onto main3eef4473.The shell
App::launch_module_asasksapps::window_hintfor the manifest'swindow.window_hintreads the bundle the Card runner is about to open: a system app's admitted build (unpacked on its first launch) or the installed app's bundle.WmLayout::insert_sizedthen opens the window atdesktop_layout::preferred_size:desktop::dock_overlayreads, from the shelf's own geometry, how many points of the work area's bottom the dock covers: 78 for macOS and OctoSense, and 0 for Windows (its taskbar reserves its strip), NeXTSTEP, Omarchy and the phone rows.preferred_sizeclamps the hint to the room above the dock, so the window ends 32 points above it. The zoom bar and the status line ("Saved", storage use) are never behind the dock.preferred_size, for review. The hint path's placement uses the same room above the dock. Without that, the third and later cascaded windows on a 900-point-tall desk would again end up to 78 points behind the dock. A test covers all seven cascade positions.window, and for every other module, today's rule is unchanged. The constants now have names, and a test pins the old numbers.WindowRequest::Open { size: _ }), as agreed.PDF Tools. The bundle's manifest sets
"schema_minor": 1and"window": {"width": 1536, "height": 1024}. System-app packing still works by digest fromdesktop/system-apps.json.Tests
desktop_layout:desktop::tests::the_dock_overlays_the_desk_only_where_it_floats_over_it:apps::tests::a_script_apps_manifest_window_is_the_size_it_asks_forcheckswindow_hinton:pdftools_model_tests::the_shipped_manifest_asks_for_the_designs_window_size.Docs (English and Chinese together)
apps/pdftools/README: the window section, the wide layout, status and known limits.desktop/docs/code-walkthrough: how a script app's window gets its size, and the margin above a floating dock.apps/README: the bundle's manifest fields.PDF Tools at its own size, with the real engine
The binary was
target/debug/octosense, built withcargo build --locked -p octosense --no-default-features --features app-hub,craft-enginesat487c79db. That commit'scrates/shell,desktop,apps/pdftools/bundleandCargo.locktrees are the same at this head. It ran on macOS (Apple silicon).Each run:
OCTOSENSE_HOME,MAKEPAD_HIDE_WINDOWS=1andMAKEPAD_REMOTE=127.0.0.1:8915;/quit;The frames and receipt are in
apps/pdftools/tests/evidence/window-20261010/.apps/pdftools/tests/ui.py'sshellrun, unchanged, light and then dark, with PDF Tools opened at startup (MAKEPAD_WM_TEST_APP):pdfengine, at the runtime's 64 ms script budget, with no script errors.wm: pdftools asks for a 1536x1024 window; it opens at 1296x703 (the dock covers 78 points of the desk).Findings (recorded in the receipt and the READMEs)
wide/06a-combine-end.png).What ran
On the Linux build host (x86_64), at
487c79db, from a fresh clone:python3 tools/setup.py --check --cargo: passed.cargo test --locked -p octosense-shell --features mobile-apps --lib -- desktop_layout desktop::tests apps::tests::a_script_apps_manifest_window_is_the_size_it_asks_for pdftools_model. 32 passed.phone/:cargo test --locked --features mobile-apps -p octosense-shell, with phone.yml'sOCTOS_SHELL_TEST_KERNELandMAKEPAD_SPLASH_BUDGET_MS=10000. 1177 passed, 0 failed.cargo check --locked -p octosense-home --features mobile-apps, fromphone/: passed.cargo check --locked -p octosense, fromdesktop/: passed.587aefd4, the first commit, these also passed:cargo check --locked -p octosense --features mobile-appsandbash ../tools/check-shell-graph.sh -p octosense, fromdesktop/; andbash ../tools/check-shell-graph.sh -p octosense-home, fromphone/. apps.yml's locked-graph check also passed:cargo tree --locked -p octos-app -i octos-core --target all --depth 0shows one octos.On the Mac:
python3 tools/setup.py --update,--check --cargoandpython3 tools/native_apps.py --check. The last two were run again after the rebase onto main3eef4473, which changed onlytools/ci_local_merge.py, its test anddocs/local-ci.md.python3 -m unittest rom/tests/test_no_local_paths.py.App Hub's gate on the PDF Tools bundle, with
hubfrom App Hub #207's tree, on a stamped copy (hub check --system-app):listing.json. That is a store requirement no system app bundle meets, and main's bundle gets the same single refusal.What did not run
tools/ci-local.sh. The coordinator gates it.cargo checkvariants (desktop.yml's three, and phone.yml's default and AppCard).restart,fullandemptyruns at the new size.🤖 Generated with Claude Code