Repository navigation
fix(profile): Profile Strength measured the wrong things (#585) - #601
Merged
Merged
Conversation
Two defects, one in each of the two places completion is calculated. Skills counted core.user_skills with no taxonomy filter. That table holds three taxonomies — csi, onet and soft_skills — and the soft-skills self-assessment alone writes 25 rows, so rating yourself on that questionnaire satisfied the ">= 3 skills" component outright with zero trade skills. Measured, not assumed: [email protected] has zero csi/onet rows and three soft_skills rows, and GET /v1/profiles/completion/status returned completionPercentage 100 while the Skills widget on his own profile read "No skills added yet". The widget filters to csi/onet; the score did not. Fixed in both paths, because both were wrong and only one of them is the one that served that 100: migration 345 for core.v_profile_completion_scores, and the .in() filter in routes/profile-completion.ts. A Deno test now asserts the shared rule so changing one side without the other is a visible edit rather than a silent divergence. Identity awards 20 points for a non-empty core.users.headline, and no editor in the app could set one. The wizard collects a headline and requires it, but the wizard is not reachable (#584); the General Information editor had no such field, and PATCH /v1/profiles/general did not accept one. So 20 points were unreachable for every user no matter what they filled in. Rather than drop headline from the score, this makes it reachable — it is a real product concept, rendered on the profile header, community posts and search results. Added to the general schema (120 char cap), the editor, and both directions of /v1/profiles/general. Co-Authored-By: Claude Opus 5 <[email protected]>
thinkclay
added a commit
that referenced
this pull request
Aug 12, 2026
* test: repoint the profile e2e specs at routes that exist, and run the Deno lib tests (#592) Twelve specs under tests/e2e/profile/ visited a URL space the app no longer serves. Seven targeted /profile/general, /profile/employment, /profile/education and /profile/certifications — all redirect stubs since the nine-screens-to-four consolidation — and asserted expect(page.url()).toContain(<old path>), which the redirect makes false. They now visit the live routes, and their titles name the section they actually exercise ("/profile/resume (General Information)") rather than a screen that was deleted. PROFILE_AUDIT_PLAN.md listed /dashboard/profile/*, a prefix the app has never served, and half its entries were screens that no longer exist. Replaced with the live route list plus an explicit stub-to-destination table. Separately: functions/api/__tests__/lib/*.test.ts was in no runner glob. test:api:rest:suite and the CI workflow both listed only routes/ and integration/, so profile-completion-calc.test.ts had never run, and neither had the schema tests added in #597 or the parity tests added in #601. Added to both, plus a standalone test:api:lib. That is 34 assertions moving from "written" to "executed". The profile specs are corrected but deliberately NOT added to testMatch yet. Turning them on needs one verified green run — Supabase up, api function served, dev server warm, seeded workers present — and this environment has no Docker, so they have been fixed but not executed. Adding them unrun would ship exactly the "known-red selection" playwright.config.ts already warns about. The config now carries the precise command to finish the job. Co-Authored-By: Claude Opus 5 <[email protected]> * test: run scf-core in the default suite (#593) scf-core holds every line of profile UI logic and was explicitly excluded from test:unit, so `pnpm test` and CI never ran any of it. 146 test files, ~1,000 assertions, none of them executing on the command the repo treats as "the tests". Running the suite directly: 955 passed, 61 skipped, 2 failed. It also completes — it does not OOM, contrary to the premise of #504. The `pool: 'forks'` workaround already in packages/scf-core/vitest.config.ts is doing its job; what remained was simply the exclude flag. The two failures were the same wrong assertion in two assessment widgets: expect(container.firstChild).toBeNull() renderWithProviders wraps in BeyondUIThemeWrapper, which renders a real element, so container.firstChild is that wrapper and can never be null. The assertion failed whether or not the widget rendered — it was testing the harness, not the component. Both now assert the widget's own testid is absent, which is what "should not render widget when assessment is completed" actually means. With those fixed the suite is green, so the exclude comes off. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]>
This was referenced Aug 12, 2026
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.
Closes #585. Part of #594.
Skills counted the soft-skills questionnaire
core.user_skillsholds three taxonomies —csi,onetandsoft_skills— and the 25-question soft-skills self-assessment writes a row each. Both completion paths counted the table unfiltered, so rating yourself on that questionnaire satisfied the>= 3 skillscomponent outright with zero trade skills.Measured rather than assumed:
[email protected]has zero csi/onet rows and three soft_skills rows, andGET /v1/profiles/completion/statusreturnedcompletionPercentage: 100— while the Skills widget on his own profile read "No skills added yet". The widget filters to csi/onet; the score did not.Fixed in both places, because completion is calculated twice and only one of them served that 100:
345forcore.v_profile_completion_scores.in("skill_taxonomy", …)filter inroutes/profile-completion.tsFixing only the view would have left the observed behaviour unchanged, which is worth knowing if you review the migration alone.
A Deno test asserts the shared rule so changing one side without the other becomes a visible edit here rather than a silent divergence in production.
Identity scored a field nothing could set
Identity awards 20 points for a non-empty
core.users.headline. No editor in the app could set one: the Profile Wizard collects a headline and requires it, but the wizard is unreachable (#584); the General Information editor had no such field; andPATCH /v1/profiles/generaldid not accept one. Twenty points were unreachable for every user no matter what they filled in.The issue offered either direction. This takes the "make it reachable" one, because headline is a real product concept already rendered on the profile header, community posts and search results — dropping it from the score would have left the app unable to collect something it displays. Added to the client schema (120-char cap), the editor, and both directions of
/v1/profiles/general.This also unblocks part of #584: the wizard's general step now has a real write path for the headline it collects.
Verification
__tests__/lib(17 request-schema, 8 completion-calc, 5 new parity, plus existing), 0 failures.scf-coretypechecks at 0 errors;supabase:buildgreen;pnpm prepushgreen.Not verified against a live database — Docker is down in this environment, so the migration has not been applied and observed. It is a
CREATE OR REPLACE VIEWwhose only change from 340 is the addedAND us.skill_taxonomy IN ('csi','onet')predicate.CI checks will show red without running — Actions billing block, see #375.
🤖 Generated with Claude Code