Skip to content

fix(webmail): populate reply recipients and subject - #766

Open
luckycrm wants to merge 1 commit into
oblien:mainfrom
luckycrm:fix/webmail-compose-replies
Open

fix(webmail): populate reply recipients and subject#766
luckycrm wants to merge 1 commit into
oblien:mainfrom
luckycrm:fix/webmail-compose-replies

Conversation

@luckycrm

Copy link
Copy Markdown

Summary

Fixes webmail reply and reply-all composers so recipient chips and the reply subject are initialized from the selected message.

Motivation

The existing reply effect computed recipient arrays but discarded them, while the shared email composer hid the subject whenever a reply ID was present. As a result, replies could open without usable recipients and without a visible or sent subject.

Related issue

None — this is a focused bug fix, which CONTRIBUTING.md permits as a direct pull request.

Changes

  • Added a pure helper for reply/reply-all recipient and subject defaults.
  • Initialized To, Cc, and Subject from the selected message while preserving draft values.
  • Excluded the user's own aliases and case-insensitive duplicates from reply-all.
  • Kept the subject field visible for replies so the subject is sent.
  • Added regression coverage for reply, reply-all, own-sent messages, and subject-prefix deduplication.

Verification

bun test apps/email/server/test/reply-defaults.test.ts
# 4 passed, 0 failed

(cd apps/email/server && bun test)
# 58 passed, 0 failed

bun run --cwd apps/email/client build
# passed

bun run --cwd apps/email/server build
# passed

bun run test
# Reached the CLI suite; 3 unrelated completion tests failed because the
# current Node runtime emits a module.register() deprecation warning to stderr.
# CLI result: 484 passed, 3 failed.

bun run --cwd apps/email/client lint cannot start on the upstream checkout because the existing eslint.config.ts imports missing package @zero/eslint-config.

The two new files pass scoped Prettier checks. The two existing client files retain their upstream formatting to avoid an unrelated whole-file reformat.

Screenshots

Not applicable; this restores existing reply fields and data flow.

Checklist

  • This PR contains one change (no grab-bag).
  • The diff is scoped and contains no unrelated formatting or refactors.
  • I added a regression test that fails before and passes after the fix.
  • bun run test, relevant lint/typechecks, and bun format pass locally (upstream/environment blockers documented above; relevant tests and builds pass).
  • I understand every line in the diff.

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.

1 participant