chore: strip operator-of-the-SaaS layer (build-validation before history scrub) - #15
Merged
Merged
Conversation
The extraction left Practiq's own GTM/ops tooling in the public repo. Remove it (no product code depends on it; admin-auth.ts is kept for middleware): - src/app/admin/* + src/app/api/admin/* (operator dashboards: leads, analytics, funnels, agent-metrics, signups, incidents, blog, crawler) + components/admin/* - src/lib/outreach/* + src/lib/admin/* + src/lib/seo/google-sc.ts - 20 operator crons (cold-send, reply-monitor, discovery-outreach, email-nurture, slack-*, seo-fetch/submit, trade-press-send, ... ) — kept product crons (anomaly-detector, digest-compactor, embeddings-backfill, factedge-inference, freshness-refresh, health-check, nightly-briefing) - src/app/api/webhooks/instantly (cold-email webhook; kept resend + stripe) - operator scripts (lead-gen incl. a prospect-PII CSV, gsc-*, dogfood-*, jobspy-hiring-trigger, press-drafts, inspect-prod-*, ...) - next.config: drop the .cycle/customer-discovery-kit tracing block Build-validation only (this branch) before the history rewrite. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
seungdo-keum
added a commit
that referenced
this pull request
May 28, 2026
…page + extended E2E
Three additive surfaces, all read-only / no risk to existing flows.
1. **FoundingCounter** (`src/components/founding-counter.tsx`)
- Reads the singleton `FoundingSlot` row (cap default 50) and
renders "X of 50 claimed" + progress bar + low-slots warning.
- Two variants: `hero` (stacked card) for landing pages, `inline`
(compact pill) for nav / sticky footer reuse.
- DB blip fallback: renders "Limited to 50 firms · founding cohort"
instead of "0 of 50" so the public page never shows a confusing
zero-claimed scarcity number pre-launch.
- Mounted on `/founding-member` (hero) AND `/pricing` (hero,
beneath the existing rounded badge). Both pages set
`dynamic = "force-dynamic"` + `revalidate = 0` so the counter
reflects every Stripe-webhook write within seconds.
- Side-effect safety: this component is READ-ONLY. The Stripe
webhook holds the only write path with the atomic `UPDATE …
WHERE claimed_count < cap` pattern. Re-rendering the counter
a million times produces zero writes.
2. **/app/settings/learned-patterns** (`src/app/app/settings/learned-patterns/page.tsx`)
- Operator-facing read view of every AgentRule the pattern learner
has accumulated. Bucketed identically to the T4 firm-patterns
reader: APPLY (promoted, ≥0.85) / Consider (candidate, 0.6-0.85) /
DO NOT produce (RUN 21 unsafe within 30d) / Below threshold.
- Each rule renders: title pattern · item type · client name ·
confidence + visual bar · times applied · first-seen date.
`promoted` and `unsafe` flags get colored badges.
- Empty state nudges the operator to the approval queue.
- Closes audit finding #15: "skill-generator writes patterns;
promised UI doesn't exist." It does now — and matches the
operator's mental model from the AI's perspective (same
buckets the model sees in T4 firm-patterns prompt).
3. **Extended agent-pipeline E2E** (`tests/e2e/agent-pipeline.spec.ts`)
- 4 new tests: a14 (download 401 anonymous), a15 (download
unknown-format 400), a16 (/pricing renders counter), a17
(/founding-member renders counter + Offer JSON-LD with
LimitedAvailability).
- All four explicitly tolerate the cap-only fallback so a
pre-seeded DB doesn't fail the suite.
233/233 vitest pass · type-check ✅ · lint ✅. New surfaces are
backward-compatible and don't touch any existing write path.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
seungdo-keum
added a commit
that referenced
this pull request
May 29, 2026
…page + extended E2E
Three additive surfaces, all read-only / no risk to existing flows.
1. **FoundingCounter** (`src/components/founding-counter.tsx`)
- Reads the singleton `FoundingSlot` row (cap default 50) and
renders "X of 50 claimed" + progress bar + low-slots warning.
- Two variants: `hero` (stacked card) for landing pages, `inline`
(compact pill) for nav / sticky footer reuse.
- DB blip fallback: renders "Limited to 50 firms · founding cohort"
instead of "0 of 50" so the public page never shows a confusing
zero-claimed scarcity number pre-launch.
- Mounted on `/founding-member` (hero) AND `/pricing` (hero,
beneath the existing rounded badge). Both pages set
`dynamic = "force-dynamic"` + `revalidate = 0` so the counter
reflects every Stripe-webhook write within seconds.
- Side-effect safety: this component is READ-ONLY. The Stripe
webhook holds the only write path with the atomic `UPDATE …
WHERE claimed_count < cap` pattern. Re-rendering the counter
a million times produces zero writes.
2. **/app/settings/learned-patterns** (`src/app/app/settings/learned-patterns/page.tsx`)
- Operator-facing read view of every AgentRule the pattern learner
has accumulated. Bucketed identically to the T4 firm-patterns
reader: APPLY (promoted, ≥0.85) / Consider (candidate, 0.6-0.85) /
DO NOT produce (RUN 21 unsafe within 30d) / Below threshold.
- Each rule renders: title pattern · item type · client name ·
confidence + visual bar · times applied · first-seen date.
`promoted` and `unsafe` flags get colored badges.
- Empty state nudges the operator to the approval queue.
- Closes audit finding #15: "skill-generator writes patterns;
promised UI doesn't exist." It does now — and matches the
operator's mental model from the AI's perspective (same
buckets the model sees in T4 firm-patterns prompt).
3. **Extended agent-pipeline E2E** (`tests/e2e/agent-pipeline.spec.ts`)
- 4 new tests: a14 (download 401 anonymous), a15 (download
unknown-format 400), a16 (/pricing renders counter), a17
(/founding-member renders counter + Offer JSON-LD with
LimitedAvailability).
- All four explicitly tolerate the cap-only fallback so a
pre-seeded DB doesn't fail the suite.
233/233 vitest pass · type-check ✅ · lint ✅. New surfaces are
backward-compatible and don't touch any existing write path.
Co-Authored-By: Claude Opus 4.6 (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.
Removes Practiq's internal GTM/ops tooling that the extraction left in the repo (admin dashboards+components, outreach lib+20 crons, lib/admin, google-sc, instantly webhook, lead-gen + ops scripts incl. a prospect-PII CSV). Kept: admin-auth (middleware dep), product crons, slack/email utils (integrated into product). This PR validates the cleaned tree BUILDS; a history scrub of the same paths follows. 100 files removed.