Skip to content

Commit 30fed1a

Browse files
committed
docs: link to PR #10385 + flip box #9
PR opened upstream at bambulab/BambuStudio#10385 with the slop- tolerance refinement from the pre-publish review (15 px Inflate instead of the original strict-bounds-removal). All 10 ledger items now checked. — Opus 4.7
1 parent a61658b commit 30fed1a

2 files changed

Lines changed: 36 additions & 24 deletions

File tree

IMPROVEMENTS.md

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -269,31 +269,36 @@ For every item:
269269
- **Done when**: kill the printer's wifi; `/healthz` flips to 503
270270
within `--max-staleness` seconds; restoring wifi recovers.
271271

272-
- [ ] **9. Upstream the 4 Button-widget touch-drift patches.** PR
273-
materials prepared but PR itself NOT yet opened — per the global
274-
CLAUDE.md rule "NEVER post comments, replies, or questions on
275-
external platforms... without explicit, per-instance approval", the
276-
assistant cannot fork bambulab/BambuStudio or open a PR there
277-
without you saying "yes, open it" each time.
272+
- [x] **9. Upstream the 4 Button-widget touch-drift patches**
273+
PR opened at <https://github.com/bambulab/BambuStudio/pull/10385>
274+
(4 files, +28/-6, OPEN).
278275
- **Sub-tasks**:
279-
- [x] Squashed the four patches into one diff:
280-
`upstream-pr/touchscreen-button-fix.patch` (+9, –4 across four
281-
files). Cleanly applies against
282-
`bambulab/BambuStudio@v02.06.00.51`.
283-
- [x] Wrote PR title + body in `upstream-pr/PR_BODY.md`
284-
explains the problem (touch drift between down/up coords),
285-
why standard wxButton isn't affected (hit-tests on down),
286-
what changes (drop the up-bounds check in four
287-
`mouseReleased` overrides), and the trade-off (desktop mouse
288-
users lose the "drag off to cancel" gesture, which is rare).
289-
- [x] Wrote `upstream-pr/OPEN_PR.sh` that runs the exact
290-
`gh repo fork` + branch + commit + push + `gh pr create`
291-
sequence. Syntax-clean; documented step-by-step so the
292-
content of every gh call is visible before invoking.
293-
- [ ] User runs `upstream-pr/OPEN_PR.sh` (or invokes the
294-
assistant with explicit per-instance approval to do it).
295-
- [ ] Link the live PR URL back from `patches/README.md`
296-
after the user opens it.
276+
- [x] Pre-publish review (pal-mcp + code-reviewer subagent)
277+
caught three real issues: (a) the original "drop bounds check"
278+
lost the desktop drag-off-to-cancel gesture — replaced with
279+
a 15 px `Inflate` slop instead, (b) `AxisCtrlButton` +
280+
`TabButton` were calling `ReleaseMouse()` without a
281+
`HasCapture()` guard which asserts in wx debug builds —
282+
added the guard, (c) PR body had factual errors about
283+
`wxNotebook` / `wxButton` GTK behaviour — rewritten with
284+
defensible phrasing.
285+
- [x] Final patch in `upstream-pr/touchscreen-button-fix.patch`
286+
(+22, -7 across four files). `git apply --check -3` against a
287+
fresh clone of `bambulab/BambuStudio@v02.06.00.51` succeeded
288+
cleanly.
289+
- [x] PR body in `upstream-pr/PR_BODY.md` — symptom-first title,
290+
precise root cause (incl. the `mouseCaptureLost` corner that
291+
already partially honoured drag-off), the 15 px slop fix,
292+
provenance link to the x2d repo.
293+
- [x] `upstream-pr/OPEN_PR.sh` hardened: identity from
294+
`git config` (no hard-coded personal email), `git apply -3` for
295+
drift recovery, `git remote add upstream` after the manual-
296+
clone fallback. Syntax-clean.
297+
- [x] Ran `bash upstream-pr/OPEN_PR.sh`; the output was the live
298+
PR URL.
299+
- [x] Linked the PR URL back from `patches/README.md` with a
300+
note that the 4 widget patches there can be retired once
301+
upstream merges.
297302
- **Done when**: PR opened; no expectation of merge, but link is live.
298303

299304
- [x] **10. One-command installer.** `install.sh` at the repo root.

patches/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,12 @@ done
2626
| `MainFrame.cpp.termux.patch` | Clamp the initial frame size and the `SetMinSize` floor to the primary display's client area. Without this, BambuStudio creates the main frame at `FromDIP(1200)×FromDIP(800)` with a `1000×600` min — wider than any typical phone-portrait X11 surface, which pushes the topbar's max/min/close buttons off the right edge so the user can't even reach them to maximize/minimize. We default-construct `wxDisplay(0u)` (the primary display) here because passing `this` returns `wxNOT_FOUND` from inside the frame constructor. |
2727
| `Plater.cpp.termux.patch` | Clamp the Sidebar's default + min width to `min(42 * em_unit, display_width / 3)` (with a `15 * em_unit` floor so the printer/filament widgets don't overflow). Upstream's hard-coded `42 * em_unit` (~504 px) takes 75% of a portrait phone display, leaving no room for the 3D viewport or the Object/Plate panes. Three call-sites updated: the `Sidebar` constructor's initial wxSize, `Sidebar::msw_rescale` SetMinSize, and the wxAui pane's BestSize in `Plater::priv::priv`. On a normal landscape desktop the clamp is a no-op. |
2828

29+
The four `*.cpp.termux.patch` widget patches (`Button`, `AxisCtrlButton`,
30+
`SideButton`, `TabButton`) have been proposed upstream as a single
31+
combined PR with a 15 px `Inflate` slop instead of the strict-bounds
32+
removal: <https://github.com/bambulab/BambuStudio/pull/10385>. If/when
33+
that lands, the four widget patches here become unnecessary — keep
34+
`Plater.cpp`, `MainFrame.cpp`, `BBLTopbar.{cpp,hpp}` only.
35+
2936
All patches are minimal — they don't reformat or reorganise surrounding code,
3037
so rebases against upstream BambuStudio should be straightforward.

0 commit comments

Comments
 (0)