Implement public audit pages

This commit is contained in:
Matthias
2026-06-05 14:14:07 +02:00
parent 03cb65fde4
commit 47ee2c2d51
25 changed files with 1039 additions and 45 deletions

View File

@@ -1,9 +1,10 @@
---
id: TASK-12
title: Publish customer audit pages with manual approval
status: To Do
status: Done
assignee: []
created_date: '2026-06-03 19:14'
updated_date: '2026-06-05 12:13'
labels:
- mvp
- audit
@@ -24,11 +25,11 @@ Build the public customer-facing audit page system under the audit domain. Pages
## Acceptance Criteria
<!-- AC:BEGIN -->
- [ ] #1 Public audit pages render approved audit content with company name, domain, screenshots, observations, impact, suggestions, and final offer/CTA
- [ ] #2 Unapproved audit URLs show Dieser Audit ist noch nicht freigegeben without leaking company details
- [ ] #3 Deactivated audit URLs show a neutral unavailable message without exposing audit content
- [ ] #4 Audit pages are noindex, excluded from sitemap/public listing, and use a calm fixed light design
- [ ] #5 Approved pages are cached and cache is invalidated when the audit is edited and re-approved
- [x] #1 Public audit pages render approved audit content with company name, domain, screenshots, observations, impact, suggestions, and final offer/CTA
- [x] #2 Unapproved audit URLs show Dieser Audit ist noch nicht freigegeben without leaking company details
- [x] #3 Deactivated audit URLs show a neutral unavailable message without exposing audit content
- [x] #4 Audit pages are noindex, excluded from sitemap/public listing, and use a calm fixed light design
- [x] #5 Approved pages are cached and cache is invalidated when the audit is edited and re-approved
<!-- AC:END -->
## Implementation Plan
@@ -40,3 +41,17 @@ Build the public customer-facing audit page system under the audit domain. Pages
4. Add noindex metadata and ensure audit routes are not listed in sitemap/navigation.
5. Add cache/revalidation behavior tied to approval and update actions.
<!-- SECTION:PLAN:END -->
## Implementation Notes
<!-- SECTION:NOTES:BEGIN -->
Reapplying TASK-12 changes after failed pull lost previous implementation. Upstream TASK-1 through TASK-11 code is now present locally; implementation will adapt to current Convex/generated API and existing app structure.
Reapplied TASK-12 public audit implementation after pull-loss recovery. Verified with pnpm test (244/244), pnpm exec tsc --noEmit, pnpm lint (0 errors, 2 existing generated warnings), and pnpm build using the updated .env.local.
<!-- SECTION:NOTES:END -->
## Final Summary
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
Public audit pages were reapplied and verified: approved public pages render public audit content with screenshots, observations, suggestions and CTA; hidden/deactivated states do not leak details; pages are noindex and excluded from sitemap; cache/revalidation hooks are in place. Verified with pnpm test, tsc, lint, and build.
<!-- SECTION:FINAL_SUMMARY:END -->

View File

@@ -1,9 +1,10 @@
---
id: TASK-13
title: Build the audit and outreach review workspace
status: To Do
status: In Progress
assignee: []
created_date: '2026-06-03 19:14'
updated_date: '2026-06-05 12:13'
labels:
- mvp
- review
@@ -35,9 +36,16 @@ Create the internal review workspace where Matthias can inspect and edit the fin
## Implementation Plan
<!-- SECTION:PLAN:BEGIN -->
1. Build review route/detail UI with tabs for Audit, E-Mail, Telefon, Quellen, Rohdaten, and Skills.
2. Add edit forms for audit text, email subject/body, phone script, and follow-up.
3. Add approval actions for audit publication and separate email sending readiness.
4. Show source/contact confidence without exposing unnecessary raw noise by default.
5. Verify state transitions back into the Kanban/Funnel.
1. Wire PageSpeed completion into audit_generation queue
2. Verify handoff with regression tests
3. Build review workspace UI and edit/approval flows
4. Verify state transitions back into dashboard/funnel
<!-- SECTION:PLAN:END -->
## Implementation Notes
<!-- SECTION:NOTES:BEGIN -->
Starting TASK-13 with the missing PageSpeed-to-audit-generation handoff so generated audit content exists for the review workspace.
Implemented first TASK-13 prerequisite: PageSpeed completion now queues audit_generation for the same lead via internal.auditGeneration.queueLeadAuditGeneration. Queue failures are logged as warnings and do not fail the PageSpeed run. Verified with pnpm test (245/245), pnpm exec tsc --noEmit, pnpm lint (0 errors, existing generated warnings), and pnpm build using .env.local.
<!-- SECTION:NOTES:END -->

View File

@@ -0,0 +1,32 @@
---
id: TASK-27
title: Trigger audit generation after PageSpeed audit
status: To Do
assignee: []
created_date: '2026-06-05 12:10'
updated_date: '2026-06-05 12:12'
labels: []
dependencies: []
priority: high
ordinal: 29000
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
Wire the existing AI audit generation queue into the current automated flow so completed PageSpeed audit runs schedule audit_generation for the same lead.
<!-- SECTION:DESCRIPTION:END -->
## Acceptance Criteria
<!-- AC:BEGIN -->
- [ ] #1 Successful PageSpeed audit runs queue audit generation for the lead
- [ ] #2 Failed PageSpeed audit runs still queue audit generation when a lead was started so partial evidence can produce an audit
- [ ] #3 Existing dedupe in queueLeadAuditGeneration prevents duplicate audit_generation runs
- [ ] #4 Regression tests cover the PageSpeed-to-audit-generation handoff
<!-- AC:END -->
## Implementation Notes
<!-- SECTION:NOTES:BEGIN -->
Created accidentally while implementing the PageSpeed-to-audit-generation handoff. Superseded by TASK-13 because the handoff is a prerequisite for the audit/outreach review workspace. Do not implement separately.
<!-- SECTION:NOTES:END -->