feat(ontology): catalog observed occupations by published title - #744
feat(ontology): catalog observed occupations by published title#744seonghobae wants to merge 1 commit into
Conversation
Let authenticated users select an occupation that actually has observations in the chosen imported source, showing the published title instead of requiring a typed O*NET-SOC code (ADR 0261).
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| .catch(() => setStatus("error")); | ||
| } |
There was a problem hiding this comment.
📝 Info: Pagination binds to the loaded profile, not the occupation dropdown
In load, an offset != null request is built from profile, not from the current selectedOccupation. Switching the occupation dropdown without re-submitting leaves the displayed profile and the dropdown out of sync, and 다음 관측값 불러오기 paginates the previously loaded occupation. The pagination test asserts this, so it is intended.
(Refers to this code)
Was this helpful? React with 👍 or 👎 to provide feedback.
| .then((payload) => { | ||
| if (!active) return; | ||
| const loaded = payload.source_available ? payload.occupations : []; | ||
| setOccupations(loaded); | ||
| setSelectedOccupation(loaded[0]?.onetsoc_code ?? ""); |
There was a problem hiding this comment.
📝 Info: Unavailable source silently rendered as empty occupation list
The occupations effect maps a source_available:false payload to [] (line 68), which renders the empty-list status instead of the unavailable alert, contrary to ADR 0261's distinction. This branch is unreachable in practice: selectedSource always comes from fetchOccupationRatingSources, which only lists non-scales_reference sources with observations, so the occupations endpoint never returns false for it.
Was this helpful? React with 👍 or 👎 to provide feedback.
|
Superseded by #746 after concurrent implementation was discovered. #746 returns the complete persisted occupation domain without an arbitrary catalog bound and includes authentication-change reset, source/occupation response fencing, exact PostgreSQL membership evidence, and reviewed selector-state fixes. The non-duplicative title/code filter remains in #745 and is being restacked onto #746. |
Summary
Stacked on #743. Does not derive a ranking, recommendation, or local score.
Verification
uv run --extra dev --extra backend pytest -q tests/test_occupation_rating_ingestion.py tests/test_public_docstrings.py tests/test_documentation_hygiene.py(16 passed)corepack pnpm run lintcorepack pnpm exec vitest run src/components/OccupationRatingProfile.test.tsx src/api.test.ts(14 passed)corepack pnpm run buildcorepack pnpm run build-storybook