chore(wolf): record what this stretch of work taught

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas RayanandClaude Sonnet 5.5 committed 2026-10-22 22:44:54 -03:00
1 parent d29ecec8d9
commit 9e50b47b5d
1 file changed
+13
+13
View File
@@ -11,6 +11,8 @@ budget_tokens: 2000
## User Preferences ## User Preferences
<!-- How the user likes things done. Code style, tools, patterns, communication. --> <!-- How the user likes things done. Code style, tools, patterns, communication. -->
- Writes in Portuguese (pt-BR); answer in Portuguese. Wants things finished end to end: merged, released, deployed and checked in production, without being asked again (said so on 2026-10-22).
- Likes a clean interface with every function reachable (Apple / Anthropic as references, Outlook over Gmail), dark theme by default with a light one.
## Key Learnings ## Key Learnings
@@ -21,7 +23,18 @@ budget_tokens: 2000
<!-- Mistakes made and corrected. Each entry prevents the same mistake recurring. --> <!-- Mistakes made and corrected. Each entry prevents the same mistake recurring. -->
<!-- Format: [YYYY-MM-DD] Description of what went wrong and what to do instead. --> <!-- Format: [YYYY-MM-DD] Description of what went wrong and what to do instead. -->
- [2026-10-22] `git add -A` swept the untracked `.wolf/` and `CLAUDE.md` into a public repo. Add explicit paths (`git add services migrations`), never `-A`.
- [2026-10-22] Deploy is two steps: PATCH the Coolify env `IMAGE_TAG` to `sha-<commit>` and only then POST /deploy. A deploy without the PATCH redeploys the old image and still says "finished". Wait for the Release run to be `completed`, not just for `gh run watch` to return.
- [2026-10-22] `pkill -f <pattern>` kills the shell that is running it when the pattern appears in the command text. Use a bracket such as `[m]ock.mjs`, and never in a command that also contains the pattern as plain text.
- [2026-10-22] `~/.claude/tools/chrome-claude --print-path` launches Chrome. Pass the wrapper only as `executablePath`.
- [2026-10-22] `services/protocols` e2e tests apply only migration 0001. Delivery code must not call SQL functions or columns from later migrations.
- [2026-10-22] A `<Button>` inside a `<form>` submits it unless `type="button"` (Undo send used to resend the message).
- [2026-10-22] Never run side effects inside a React state updater (it can run twice).
## Decision Log ## Decision Log
<!-- Significant technical decisions with rationale. Why X was chosen over Y. --> <!-- Significant technical decisions with rationale. Why X was chosen over Y. -->
- 2026-10-22 Sessions: webmail session is 30 days and renewed daily while in use; each account is also a `lm_acct_<id>` cookie, `lm_user_session` stays the active one so the Go service and the middleware needed no change. Console stays at 8 hours.
- 2026-10-22 Trusted senders live in table `trusted_senders`; delivery rescues a Junk verdict only when DMARC passed, or SPF passed for the From domain (a forged From must not be rescued).
- 2026-10-22 Conversations: `thread_id` is written at delivery (Message-ID, then In-Reply-To/References, then Re:-subject); NULL means "its own conversation" via COALESCE(thread_id, id). Subject key is computed in Go at delivery and in SQL (`lm_subject_key`) for the backfill; a test holds them equal.
- 2026-10-22 Themes: every colour is a CSS variable per theme (`globals.css`), Tailwind scales (slate, indigo, amber, rose, emerald) read them, `ink` is the on-ground colour. Dark is default; the theme is chosen by a script in `<head>` before first paint. Font Geist is self-hosted (@fontsource-variable/geist).