feat(compose): collapse Cc/Bcc into expandable links under the To field #82

Merged
JMR-dev merged 4 commits from feat-compose-collapsible-cc-bcc into main 2026-07-01 22:29:52 +00:00
JMR-dev commented 2026-07-01 22:06:10 +00:00 (Migrated from github.com)

Summary

  • Cc and Bcc in the compose screen now start collapsed into small left-aligned link buttons directly under the To box, freeing ~two field heights of vertical space for the message body.
  • Tapping a link expands it into the regular OutlinedTextField and focuses it. A field also expands automatically when it already carries recipients (reply-all / mailto prefill, resumed drafts) and never re-collapses once shown, so it can't vanish mid-edit. Expansion state is rememberSaveable-backed UI state and survives rotation.
  • Rides along: fix — resuming a draft silently dropped its Bcc recipients (saveOrDeleteDraft persists bcc, but the init-block restore never copied it back). With collapse-when-empty this data loss would have become invisible, so it's fixed here with a regression test.

Test plan

  • New E2E test (ComposeScreenTest): fields start collapsed (no editable node), expand via the links, and typed Cc/Bcc carry through send.
  • New unit test: draft resume restores bcc.
  • Preflight green locally (assembleDebug, testDebugUnitTest, lintDebug, ktlintCheck, detekt) + :app:compileDebugAndroidTestKotlin.
  • Manually verified on the API 37 emulator via a mailto: deep link: collapsed links render under To, expansion/focus/rotation behave as designed.

🤖 Generated with Claude Code

## Summary - Cc and Bcc in the compose screen now start collapsed into small left-aligned link buttons directly under the To box, freeing ~two field heights of vertical space for the message body. - Tapping a link expands it into the regular `OutlinedTextField` and focuses it. A field also expands automatically when it already carries recipients (reply-all / mailto prefill, resumed drafts) and never re-collapses once shown, so it can't vanish mid-edit. Expansion state is `rememberSaveable`-backed UI state and survives rotation. - Rides along: **fix** — resuming a draft silently dropped its Bcc recipients (`saveOrDeleteDraft` persists `bcc`, but the init-block restore never copied it back). With collapse-when-empty this data loss would have become invisible, so it's fixed here with a regression test. ## Test plan - New E2E test (`ComposeScreenTest`): fields start collapsed (no editable node), expand via the links, and typed Cc/Bcc carry through send. - New unit test: draft resume restores `bcc`. - Preflight green locally (assembleDebug, testDebugUnitTest, lintDebug, ktlintCheck, detekt) + `:app:compileDebugAndroidTestKotlin`. - Manually verified on the API 37 emulator via a `mailto:` deep link: collapsed links render under To, expansion/focus/rotation behave as designed. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.