Skip to content

Personalized names for completed workouts on the feed - #47

Open
methodsat-afk wants to merge 1 commit into
mainfrom
feat/personalized-workout-names
Open

Personalized names for completed workouts on the feed#47
methodsat-afk wants to merge 1 commit into
mainfrom
feat/personalized-workout-names

Conversation

@methodsat-afk

Copy link
Copy Markdown
Contributor

Closes FITFO-730.

What

A completed workout showed up on the community feed under its plan label — "Push A", "Upper B". It now reads as the person's own:

Feed post Before After
Grady, morning Push A Grady's Turbo Push Day
Grady, evening (same workout) Push A Grady's Thunder Push Day
Aston Upper B Aston's Gritty Upper Day
Joe Shoulders+Arms A Joe's Golden Shoulders & Arms Day
Sam Rest Sam's Rest Day

Scope

Feed only. The plan keeps the coach's regular names. Nothing about how a workout is scheduled, started, logged, or matched changes — this is display on CommunityScreen and nothing else. No API or schema changes.

How the adjective is chosen

From a bank of 30 words, seeded on the post id. That was the key decision, and it buys three things at once:

  • Each completion gets its own word. Logging two workouts in one day yields two different adjectives, because they're two different posts.
  • A post's name never changes. A raw Math.random() would rename an old post on every re-render; a date-based seed would rewrite history every morning. Both are wrong for a permanent record.
  • No workout type is pinned to a word. The same Push A reads differently every time it's logged.

Rest and recovery sessions skip the adjective. Anything unpersonalizable — no author name, a placeholder like "FitFo Member", an unreadable title — falls through to the original title untouched, so a post can never render worse than it started.

Computed once per post and reused for the three accessibility labels, so screen readers match what's on screen.

Test plan

  • 28 unit tests on the naming utility, including two posts of the same workout by the same person resolving to different adjectives
  • 30 logs of one workout produce >10 distinct adjectives (proves nothing is pinned)
  • Output is asserted to only ever come from the bank
  • Full mobile suite: 628 passing
  • tsc --noEmit at 224 errors — exactly baseline, none in the changed files
  • Eyeball the feed on a device with a couple of logged workouts

Files

  • src/lib/completedWorkoutName.ts — new, pure, no React Native imports
  • src/lib/completedWorkoutName.test.ts — new
  • src/screens/CommunityScreen.tsx — 13 lines

FITFO-730. A logged session showed up on the feed under its plan label
("Push A"). It now reads as the person's own: "Grady's Turbo Push Day".

Feed-only. The plan keeps the coach's regular names — nothing about how a
workout is scheduled, started, or logged changes. This is display on the
community feed and nothing else.

The adjective comes from a bank of 30, seeded on the post id. That gives the
three properties a feed needs: each completion draws its own word, so logging
two workouts in one day yields two different adjectives; a post's name never
changes once written, which a Math.random() (rerenders) or a date seed
(rewrites history) would both break; and no workout type is pinned to a word,
so the same "Push A" reads differently every time it is logged.

Rest and recovery sessions skip the adjective. Anything unpersonalizable — no
author name, a placeholder like "FitFo Member", an unreadable title — falls
through to the original title untouched.

Applied once per post and reused for the three accessibility labels, so screen
readers match what is on screen.
@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
fitfo-web Ready Ready Preview Aug 1, 2026 2:27am

Request Review

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