Skip to content

feat(TRB-048): reconcile priming, positioning, and Compass progress semantics - #65

Merged
MikeBlakeway merged 6 commits into
mainfrom
feat/TRB-048
Apr 17, 2026
Merged

feat(TRB-048): reconcile priming, positioning, and Compass progress semantics#65
MikeBlakeway merged 6 commits into
mainfrom
feat/TRB-048

Conversation

@MikeBlakeway

Copy link
Copy Markdown
Owner

Summary

This PR implements TRB-048 by aligning onboarding priming guidance, /users/me contract shape, Compass state handling, and posting/reposting gate messaging with Spec 25 option 1.

What changed

  • Redesigned shared MeResponse contract in packages/shared:
    • Added behaviorSignalCounts
    • Added primingProgress (likes/follows with unlockMode: 'any')
    • Added compassState (priming | positioned_unrevealed | revealed)
    • Removed legacy signalCounts and coldStartThresholds
  • Updated API GET /api/v1/users/me response + schema to return new fields and derive compassState.
  • Refactored milestone logic to ordinary-user priming lanes (likes/follows only, OR semantics).
  • Preserved bootstrap positioning eligibility in ingest (posts >= 3 || engagement >= 10 || follows >= 5) with clarifying comments.
  • Refactored Compass progress UI to two lanes (Likes/Follows), removed bottleneck + ETA messaging, and switched position page branching to compassState.
  • Updated compose/repost 403 messaging to direct users to likes/follows priming path.
  • Regenerated docs-site/api-reference/openapi.json to match updated /users/me contract.

Why

The app previously mixed priming, broader positioning inputs, and Compass reveal state. This PR separates those concerns so product copy, UI behavior, and API contracts are internally consistent with existing posting/reposting gates.

Validation

  • API tests updated and passing
  • Web tests updated and passing (including regression checks for removed misleading copy)
  • Typecheck/lint clean for touched packages
  • OpenAPI regenerated from code

Changed areas

  • apps/api/src/routes/users.ts
  • apps/api/src/services/positioning/milestone.ts
  • apps/api/src/services/events/ingest.ts
  • apps/web/src/components/features/onboarding/CompassProgress.tsx
  • apps/web/src/app/(dashboard)/profile/position/page.tsx
  • apps/web/src/components/features/feed/{ComposeSheet,FeedPost}.tsx
  • apps/web/src/app/(dashboard)/feed/[postId]/page.tsx
  • packages/shared/src/types/user.ts
  • docs-site/api-reference/openapi.json

- Replace signalCounts/coldStartThresholds with behaviorSignalCounts and primingProgress
- Add compassState enum (priming | positioned_unrevealed | revealed) to MeResponse
- Update web test fixtures in profile, position, and username page tests to new shape
- Update position page to pass new prop shape to CompassProgress
- Replace signalCounts/coldStartThresholds with behaviorSignalCounts and primingProgress
- Derive compassState from positioned + compass_revealed_at fields
- Rename internal COLD_START_THRESHOLDS to PRIMING_THRESHOLDS (likes/follows only)
- Update Fastify response schema to match new MeResponse shape
- Add compassState branch tests (priming, positioned_unrevealed, revealed)
- Remove posts from computeNextMilestone() ordinary priming lanes
- Update likes threshold to 10, follows threshold to 5
- Refactor NextMilestoneResult to expose structured lane progress (current/threshold/remaining)
- Add clarifying comments to checkAndTriggerColdStart() for bootstrap context
- Update milestone tests to verify likes/follows-only semantics
- Replace three-lane UI (Posts/Engagement/Follows) with two-lane (Likes/Follows)
- Remove bottleneck progress calculation and ETA messaging
- Update copy to emphasize OR unlock condition
- Position page now branches on compassState enum (priming/positioned_unrevealed/revealed)
- Extract signal counts from primingProgress contract instead of old shape
- Update all tests and maintain accessibility standards
- Remove signalCounts and coldStartThresholds from schema
- Add behaviorSignalCounts (posts/likes/shares/follows breakdown)
- Add primingProgress (unlockMode, likes, follows with current/threshold)
- Add compassState enum (priming, positioned_unrevealed, revealed)
- Update both /api/users/me and /api/v1/users/me paths identically
- Change compose 403: Engage with the platform → Like content and follow creators to get started
- Change repost 403 in FeedPost: same message update
- Change repost 403 in detail page: same message update
- Add regression assertions for old misleading copy
- Add positive assertions for new priming path guidance
@MikeBlakeway
MikeBlakeway merged commit 6e0b659 into main Apr 17, 2026
6 checks passed
@MikeBlakeway
MikeBlakeway deleted the feat/TRB-048 branch April 17, 2026 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant