In the message reader, a message with several attachments rendered everyAttachmentRow
stacked vertically (attachments.forEach { AttachmentRow(...) }), pushing the message body
arbitrarily far down the screen. This collapses the extras behind an accordion.
Behavior
0 attachments: unchanged (caller still guards if (attachments.isNotEmpty())).
Exactly 1 attachment: renders the single AttachmentRow as before — no accordion.
More than 1: always shows the first row, then a collapsed control below it — a down
chevron + "See x more attachments" (x = attachments.size - 1). Tapping expands rows
2..N; tapping again collapses. Default state is collapsed. On expand the chevron rotates
(down→up) and the label flips to "See fewer attachments". The reveal is animated with AnimatedVisibility, matching the existing AdvancedServers accordion idiom.
Pluralization
Uses a <plurals> resource (attachments_see_more, quantity="one"/"other") via pluralStringResource, not string concatenation:
1 extra → "See 1 more attachment"
2+ extras → "See 2 more attachments"
Accessibility
The toggle is a single clickable Role.Button; the chevron carries a contentDescription
("Expand attachments" / "Collapse attachments") that flips with state, so the expanded state
is exposed to screen readers. Each row's download/open behavior and downloading/downloaded
state are untouched.
three attachments show the first row + "See 2 more attachments", with rows 2–3 hidden until
the control is tapped, then revealed;
two attachments use the singular plural form ("See 1 more attachment").
Verification
Local fast gate green: :app:assembleDebug :app:testDebugUnitTest :app:lintDebug :app:ktlintCheck :app:detekt plus :app:compileDebugAndroidTestKotlin. Instrumented E2E left
to CI. Scope limited to ui/reader/ReaderScreen.kt, strings.xml, and ReaderScreenTest.kt.
## What & why
In the message reader, a message with several attachments rendered **every** `AttachmentRow`
stacked vertically (`attachments.forEach { AttachmentRow(...) }`), pushing the message body
arbitrarily far down the screen. This collapses the extras behind an accordion.
## Behavior
- **0 attachments:** unchanged (caller still guards `if (attachments.isNotEmpty())`).
- **Exactly 1 attachment:** renders the single `AttachmentRow` as before — no accordion.
- **More than 1:** always shows the **first** row, then a collapsed control below it — a down
chevron + **"See x more attachments"** (`x = attachments.size - 1`). Tapping expands rows
2..N; tapping again collapses. Default state is collapsed. On expand the chevron rotates
(down→up) and the label flips to **"See fewer attachments"**. The reveal is animated with
`AnimatedVisibility`, matching the existing `AdvancedServers` accordion idiom.
## Pluralization
Uses a `<plurals>` resource (`attachments_see_more`, `quantity="one"/"other"`) via
`pluralStringResource`, not string concatenation:
- 1 extra → "See 1 more attachment"
- 2+ extras → "See 2 more attachments"
## Accessibility
The toggle is a single clickable `Role.Button`; the chevron carries a `contentDescription`
("Expand attachments" / "Collapse attachments") that flips with state, so the expanded state
is exposed to screen readers. Each row's download/open behavior and `downloading`/`downloaded`
state are untouched.
## Tests
Extended `ReaderScreenTest` (androidTest Compose UI), all block-body `@Test` methods returning
`Unit`:
- single attachment shows no "See more" control;
- three attachments show the first row + "See 2 more attachments", with rows 2–3 hidden until
the control is tapped, then revealed;
- two attachments use the singular plural form ("See 1 more attachment").
## Verification
Local fast gate green: `:app:assembleDebug :app:testDebugUnitTest :app:lintDebug
:app:ktlintCheck :app:detekt` plus `:app:compileDebugAndroidTestKotlin`. Instrumented E2E left
to CI. Scope limited to `ui/reader/ReaderScreen.kt`, `strings.xml`, and `ReaderScreenTest.kt`.
Closes #134
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What & why
In the message reader, a message with several attachments rendered every
AttachmentRowstacked vertically (
attachments.forEach { AttachmentRow(...) }), pushing the message bodyarbitrarily far down the screen. This collapses the extras behind an accordion.
Behavior
if (attachments.isNotEmpty())).AttachmentRowas before — no accordion.chevron + "See x more attachments" (
x = attachments.size - 1). Tapping expands rows2..N; tapping again collapses. Default state is collapsed. On expand the chevron rotates
(down→up) and the label flips to "See fewer attachments". The reveal is animated with
AnimatedVisibility, matching the existingAdvancedServersaccordion idiom.Pluralization
Uses a
<plurals>resource (attachments_see_more,quantity="one"/"other") viapluralStringResource, not string concatenation:Accessibility
The toggle is a single clickable
Role.Button; the chevron carries acontentDescription("Expand attachments" / "Collapse attachments") that flips with state, so the expanded state
is exposed to screen readers. Each row's download/open behavior and
downloading/downloadedstate are untouched.
Tests
Extended
ReaderScreenTest(androidTest Compose UI), all block-body@Testmethods returningUnit:the control is tapped, then revealed;
Verification
Local fast gate green:
:app:assembleDebug :app:testDebugUnitTest :app:lintDebug :app:ktlintCheck :app:detektplus:app:compileDebugAndroidTestKotlin. Instrumented E2E leftto CI. Scope limited to
ui/reader/ReaderScreen.kt,strings.xml, andReaderScreenTest.kt.Closes #134
🤖 Generated with Claude Code