Repository navigation
Conversation
samxu01
added a commit
that referenced
this pull request
Apr 19, 2026
…+ rate limit Unit tests mock Mongo queries, the PG pool, and the auth layer — they can't catch regressions that depend on real Mongoose regex semantics, ObjectId coercion, or middleware-ordering interactions with the rate limiter. This integration test exercises the mint endpoint end-to-end against a real MongoMemoryServer (User, Post, Pod, File, AuditLog) with a mocked PG pool for the message fan-out path. Covers the real paths unit tests can't: - Owner short-circuit on File.uploadedBy - Public post reference — any authed viewer mints - Pod-scoped post, viewer not in pod → 403 - Profile picture stored as absolute URL → real substring regex match (regression for fix #4) - PG messages reference file across multiple pods, viewer is in one → mint succeeds (regression for fix #3) - Rate limiter: 31st mint within the window → 429 (regression for fix #1 — auth must run before mintRateLimit so keyGen sees req.userId) - Audit log row lands after successful mint Slots into the existing `INTEGRATION_TEST=true` tier in tests.yml — no new CI infra, picked up by the existing Test workflow on every PR. https://claude.ai/code/session_01JGkwSJkDKerKRsnzUe8Mxe
This was referenced Apr 28, 2026
samxu01
added a commit
that referenced
this pull request
May 4, 2026
Fills the human-facing UX for the agent-dm pod type shipped in PR #275. Gap #1 — Read-only banner + composer disable Humans with §3.7 read-access (sharing a pod with one of the bots) can VIEW but not POST in agent-dm rooms. Without this, the composer accepts input and silently 401s on send. Now: composer is replaced with a soft-toned banner ("Read-only — you're observing this conversation"). Bot-bot variant phrases it as "X and Y are talking directly. To engage them, @-mention either in a shared team pod." Gap #2 — System event card for "🤝 X and Y started a DM" The §3.8 announcement post commonly-bot drops in a team pod when two agents start a DM rendered as raw markdown — including a `[view](/v2/pods /<id>)` link that opened in a new tab (markdown anchors default to `target="_blank"`, which is wrong for in-app navigation). Detect by content shape (no metadata column on PG messages yet), render as a chrome-light card with router-aware `navigate(...)` button. Gap #3 — "Between agents · N" sub-section in Private filter Bot↔bot rooms (where the human is read-only) were mixed in with regular DMs in the Private filter, hiding the relationship. Override `groupPods` when filter==='private': split into Pinned, Direct messages, and Between agents · N — the count doubles as a glanceable "how much agent-to-agent activity is happening" indicator. Gap #4 — Empty state copy for fresh agent-dm rooms Generic "Talk to your team" copy isn't helpful in a 1:1 DM context. Branch on bot-bot vs human-bot to render appropriate empty-state text ("X and Y haven't talked yet — they'll DM each other when one of them needs the other's help" vs "No messages yet — this is a private 1:1 conversation"). Design review per CLAUDE.md: no gradients, borders not shadows, one accent. Token discipline (use --v2-bg-subtle not undefined --v2-surface -soft). v2-root button.X specificity prefix on the syscard CTA. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing
npm run lint:fix(fails: ESLint couldn't find a config)npm test(fails: jest: not found)