Skip to content

Fix attachment footer overflow in the message reader - #313

Merged
huacnlee merged 1 commit into
mainfrom
fix/attachment-footer
Sep 30, 2026
Merged

huacnlee merged 1 commit into
mainfrom
fix/attachment-footer

Conversation

@huacnlee

Copy link
Copy Markdown
Owner

Fixes #237.

The reader footer previously grew by one row for every genuine attachment. With 40 files in a 380×360 reader, its body had a negative height and the message could not be read. Removing embedded images in #272 does not address that case.

Attachments now start as a single count with a Show/Hide control. Expanding them reveals an independently scrolling list, limited to 40% of the room left below the header and at most 160 theme-scaled pixels. A short list uses only its natural height. The disclosure and scroll position reset when the selected message or service changes, and messages without attachments reserve no attachment space.

The existing filename/open and save controls remain, including per-mailbox/message routing and save-busy suppression. The attachment list uses inherited theme colors, filenames remain PlainText, and no classification, fetching, saving or backend behavior changes. This PR is independent of #312.

Verification

  • ui/tests/qml/tst_attachment_footer.qml was written before the fix. The final tests were rerun against unchanged main (af8a7ae) with the real standalone controls: six failures, including a −851px body height with 40 genuine files. The patched suite passes all six cases plus setup/cleanup on Qt 6.11.2, with no warnings from the production-control run.
  • The cases exercise zero/one/few/many attachments, a 300×280 short/narrow reader, resizing, repeated collapse/expand, message switching, wheel scrolling to the final file, real pointer activation of both actions, composed mailbox/message IDs, and busy-state duplicate suppression.
  • Native make validate ran with an isolated Rust build: 640 Rust tests passed, with 11 existing ignored tests; JavaScript and portable shell/source checks passed. It then stopped at the pre-existing host-libcurl-specific tests/test_imap_ordering.sh failure (imap-id must deliver a message body). The Makefile documents why that check depends on the Omarchy libcurl behavior. Aggregate validation is therefore not fully green, and subsequent aggregate stages did not run.
  • The full main QML suite was run separately through tests/run_qml_native.py using this checkout's newly compiled backend and the official Qt 6.11.2 Quick Test runner: 1,083 passed, zero failures. An earlier run reused a sibling checkout's backend; the final run does not. The focused attachment tests also pass against the actual standalone qs.Ui/qs.Commons controls.
  • Separate Outlook HTTP tests passed (6 checks); sidebar resource-boundary tests passed (64 checks). make qml-check passed with the Qt 6.11.2 linter (existing unresolved-import/unqualified-access warnings); QML naming, PlainText source checks and git diff --check passed.
  • A fresh reviewer found no actionable code or security findings. It also exercised 300×280 through 900×600 readers at spacing scales 1, 7/6 and 1.5, resizing while scrolled to the end and shrinking the model. Security: PASS for the changed UI boundary; this is not a broader application audit.
  • The standalone host build/test suite and Omarchy plugin validation were not completed here. A separate make test-app-qml attempt was blocked by unavailable CMake in the direct execution environment. Live Omarchy/standalone-host mouse-and-keyboard verification across platforms remains outstanding.

Visual evidence and draft status

Comparable before/after offscreen captures were produced and inspected at 380×360 and 900×600, in light and dark themes at scale 1, using synthetic mail and the actual MessageReader plus standalone theme/control components. They cover the old overflowing footer, the collapsed count, the expanded list and its final file. In the small production-control fixture the patched body keeps 247px collapsed and about 146px expanded, versus −851px before.

These captures are offscreen component renders, not a manual Omarchy desktop session. GitHub-hosted before/after attachments are still pending; the captures are retained locally and were not added to the repository or a media branch. This stays a draft pending GitHub-hosted before/after images and the required manual host verification; the automated checks do not replace those gates.

Release Notes

  • Messages with many attachments keep their body readable. Show or hide the attachment list, and scroll through every file without losing the message actions.

@huacnlee
huacnlee marked this pull request as ready for review September 30, 2026 16:51
@huacnlee
huacnlee merged commit afcd736 into main Sep 30, 2026
14 checks passed
@huacnlee
huacnlee deleted the fix/attachment-footer branch September 30, 2026 16:51
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.

Display issue when rendering email with multiple attachments

2 participants