Skip to content

feat(evi): capture cross-channel feedback in a Postgres store - #563

Open
evlogai[bot] wants to merge 3 commits into
mainfrom
EVL-253/feedback-capture
Open

feat(evi): capture cross-channel feedback in a Postgres store#563
evlogai[bot] wants to merge 3 commits into
mainfrom
EVL-253/feedback-capture

Conversation

@evlogai

@evlogai evlogai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

What

The capture side of EVL-253: cross-channel feedback stored in the Postgres store provisioned in #560, ready to feed the weekly self-review and evals (consumption is a separate issue).

  • Store: a feedback table (channel, source, verdict, author, text, messageRef, threadRef, sessionRef, createdAt) with a generated migration.
  • Written feedback: a feedback__record tool any non-autonomous session can call, so a person in any conversation can say "this answer was wrong because X" and have it stored. Gated on isDbConfigured(); without the DB it degrades to a clear unavailable error.
  • Reactions share one code path, captureReaction in agent/lib/feedback.ts, which maps an emoji to a verdict and records it (or no-ops for non-thumbs and removals):
    • Linear: thumbs up/down on a comment via the channel's onDataWebhook (CommentReaction create). Fires only if the Linear webhook subscription includes the CommentReaction type; deployment-side setting, silent no-op otherwise.
    • iMessage: tapbacks bridged out of the Chat SDK's reaction pipeline (bot.onReaction). The repo's eve patch (patches/eve@0.31.3.patch) now exposes an onReaction option on photonIMessageChannel; agent/channels/photon.ts wires it to captureReaction. The patch is the existing mechanism this repo already uses for the photon channel.
  • Admin statistics: a feedback__stats tool, admin-only (canAccessAdminTools), returning totals, positive/negative split, reaction vs written counts, per-channel counts, and the recent written negative feedback with reasons.

Checks

  • lint: clean on the changed files (the evi app has no standalone lint script).
  • test: 99 passed, 16 files (4 new feedback tests on top of the previous run).
  • typecheck: green. The earlier distinctIdField failure in agent/hooks/evlog.ts was a sandbox install-linking artifact; a clean pnpm install resolves it and main typechecks.
  • eve build: succeeds with the patched channel.

Notes

  • Changes are confined to apps/evi plus the existing patches/eve@0.31.3.patch, so no changeset is needed. The lockfile diff is only the eve patch hash (13 lines).
  • GitHub reactions are the one remaining channel. The eve GitHub channel does not parse reaction webhook events (its parser covers issue_comment, pull_request_review_comment, issues, pull_request, check_suite, check_run, workflow_run). Capturing them needs (a) the GitHub App webhook subscription to include reaction events and (b) an eve github-channel extension mirroring the photon one: parse reaction events and expose an onReaction option. I did not ship that blind: it depends on the subscription existing and I cannot exercise a GitHub reaction webhook from the sandbox. Happy to do it once the subscription is confirmed or as a follow-up.
  • The iMessage bridge is verified by typecheck, tests, and the production build; a live tapback cannot be exercised from the sandbox, so the runtime path is best-effort until it observes one in the wild.
  • No migration is applied by this PR; db:migrate runs at deploy.

@changeset-bot

changeset-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f69535a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@evlogai
evlogai Bot requested a review from HugoRCD August 11, 2026 19:37
@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
evi Ready Ready Preview Aug 11, 2026 9:31pm
evlog-docs Ready Ready Preview, v0 Aug 11, 2026 9:31pm
evlog-render-lab Ready Ready Preview Aug 11, 2026 9:31pm
evlog-telemetry Ready Ready Preview Aug 11, 2026 9:31pm
just-use-evlog Ready Ready Preview Aug 11, 2026 9:31pm

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for following the naming conventions! 🙏

@pkg-pr-new

pkg-pr-new Bot commented Aug 11, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/@evlog/cli@563
npm i https://pkg.pr.new/evlog@563
npm i https://pkg.pr.new/@evlog/nuxthub@563
npm i https://pkg.pr.new/@evlog/telemetry@563

commit: f69535a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants