Add a feedback form that emails the instance operator #112
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/feedback-mail"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds a feedback form to Settings > General, shown only when the operator sets
PLANNER_FEEDBACK_EMAIL.Why this shape
Feedback needs a recipient. Persisting it would force the administrator surface this app has deliberately never had: a role, a read UI, moderation, unread state. Logging it fails differently, because nobody reads logs. Mailing it lands where the operator already looks, and costs one config value and no new data.
What it does
POST /api/feedback, session-only (API tokens are refused), rate limited to five submissions per account per hour.mail.tscaller fires and forgets because a failed share notification should not fail the share, but here the send is the entire feature, and reporting success on a message that never left the process is the one way it could betray the user.Reply-Tois the sender's verified recovery email when they have one, so answering is just hitting reply.The blueprint email template gains optional detail rows, inline images, and an attachment list;
stripToTextnow turns<br>into a real newline so multi-line messages stay readable in the plaintext part.bun run preview:emailsrenders the new mail in all three locales.Nothing is persisted, so there is no migration and no stored state to clean up.
Checks
bun run checkgreen: typecheck, oxlint, eslint, oxfmt, knip, 894 bun tests, 223 vitest tests, web build within budget.New coverage:
tests/feedback.test.ts(7 cases, end to end against a fake SMTP: gating, delivery with metadata and reply-to, subject header injection via the summary, attachment type/count/size limits, rate limit), feedback cases intests/mail.test.ts, andFeedbackSection.test.tsx(6 cases).tests/recovery.test.tspinned/api/configto an exact object, so that assertion was updated for the newfeedbackEnabledflag.The form was also verified rendering in the real app.
kReview review
Verdict: no findings
No findings to address in the reviewed diff.
The change appears low risk, with no concrete correctness, security, or regression issues established by the visible diff and repository evidence.
Reviewed by kReview at
1643e05f48. This comment is conservative and based only on the PR diff, metadata, and supplied repository context.Est. cost ~$1.04 (553.3k in / 2.5k out / gpt-5.6-sol).