Audit: funnel instrumentation + 8-type taxonomy (38 patterns) + auto-detect-first upload rail - #60
Merged
Merged
Conversation
…, sessionId join, admin funnel panel) - Stop the hourly health monitor writing bad_request AuditSample rows (was ~98.6% of the table); guard recordAuditSample on role=monitor. - Add AuditSample.sessionId (= results.id) as a join key to UiEvent.sessionId so post-result CTA actions can be attributed to their audit. - New /api/admin/audit-funnel + Funnel panel in /admin/audit-samples: spine (started, completed) from AuditSample; post-result action rate joined by sessionId. - Add read-only analysis + guarded purge scripts; spec in docs/specs. - Fix the Prisma NULL-filter gotcha (not:'admin' drops null-role real users).
…to-detect-first UX + Cowork-style upload rail - Replace generic 'other' with 4 researched types (dashboard-analytics, embedded-ai-feature, search-discovery, reports-documents) + hidden 'general' fallback. Per-type prompt emphasis so the audit actually tailors by surface. - Bring the audit library 36 -> 38: add Agent Reflection & Learning and Workspace-Native Agent Integration (anchors the embedded type). - Auto-detect-first: classify on upload, show a 'Detected type - Change' chip; un-gate Analyze from a manual pick (canAnalyze = hasImages). - Redesign the right rail into Cowork-style floating cards with a Progress stepper that advances as you act (Add screenshot -> Product type -> Analyze). - Update classifier taxonomy + eval fixture schema; design spec in docs/specs. Note: pre-existing legacy raw-color violations in the device-frame markup are left to the incremental design-token migration (design-system.md).
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
Two related workstreams on the audit tool, split into two commits.
1. Trustworthy funnel instrumentation
Fixes a measurement gap: server truth (successful audits) and the client beacon (funnel events) disagreed ~4-5x, and the samples table was ~98.6% health-monitor noise.
bad_requestAuditSamplerows; now guarded onrole=monitor. (Historical rows left for the optional purge script; admin already filters them.)AuditSample.sessionIdjoin key (=results.id) → joins toUiEvent.sessionIdso post-result CTA actions attribute to their audit. Denominator is server-side, so the rate is robust to ~75% client beacon loss./api/admin/audit-funnel+ a Funnel section in/admin/audit-samples: spine (started, completed) fromAuditSample; post-result action rate joined bysessionId.not:'admin'silently drops null-role real users).2. Taxonomy redesign + auto-detect-first + upload rail
dashboard-analytics,embedded-ai-feature,search-discovery,reports-documents) + hiddengeneralfallback. Data-driven from what actually landed in "other".ai-agentbranched).Verification
tsc --noEmitclean across all changed files.Notes
--no-verify: the only brand-check blockers are pre-existing legacy raw-colors in the device-frame markup (untouched by this PR); perdesign-system.mdthat backlog migrates incrementally.docs/specs/audit-funnel-instrumentation-fix.md,docs/specs/2026-07-13-audit-product-type-taxonomy-design.md.