EPIC C: Search + Account Lifecycle (Week 2-3) — Phase 3: Scope #34
Labels
No labels
blocked:gate-fetch
blocked:gate-implement
blocked:needs-attention
blocked:needs-decision
blocked:needs-human
blocked:needs-local-checkout
blocked:no-changes
bug
feature-request
in-progress
needs-decompose
needs-triage
ops-task
quickfix
security/high
security/low
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/nodedesk#34
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 3: Scope
Decomposed from nodedesk#3
⏸ Needs Decision
Blocking factors:
Scope: medium Risk: medium Spec: aligned Type: enhancement
Summary: Replace ILIKE search with functional Postgres FTS (add migration + triggers for searchVector columns that are schema-defined but never created/populated), complete account deletion (already implemented in UI and server action), and harden demo seed/reset scripts.
Suggestion: Add a migration to create tsvector columns + GIN indexes via raw SQL (Prisma doesn't natively support tsvector), then add PostgreSQL triggers on Client/System/Note/WorkLog to auto-update searchVector on INSERT/UPDATE — this avoids touching every action file. Backfill existing rows. Remove the searchContains/SEARCH_MODE fallback since the schema already points at FTS. Account deletion and demo scripts are already implemented but likely need smoke-testing with the new triggers.
Rationale: The FTS infrastructure is half-built: searchVector columns exist in schema.prisma with GIN index annotations, search.ts already has an FTS query path with websearch_to_tsquery + ts_rank_cd, but no migration creates these columns and no triggers or hooks populate them — so FTS returns zero results today. That makes this a ~5-8 file change (1 migration, search.ts cleanup, env.ts, .env.example, seed.ts for trigger-aware backfill). Account deletion is already complete (settings page form + server action with email confirmation + Stripe cancel + cascade delete). Demo scripts exist and work. No test files exist to break. Risk is medium because the migration touches core DB columns and existing data needs backfill, but the schema already defines the columns so forward compatibility is assured.
Action: Review each blocking factor above. Remove
blocked:needs-decisionlabel to route back to triage.GSD pipeline blocked at IMPLEMENT: API call failed after 3 retries.
]11;?\Error: Error code: 401 - {'detail': 'Unauthorized'}