Search: a career hit links to a fragment the career page does not have, so it opens at the top instead of at the section #707
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#707
Loading…
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?
A search hit in the career record (an experience, a qualification, a project, a certification or a skill) links to
/career/#experience,/career/#education,/career/#projects,/career/#certificationsor/career/#skills. None of those fragments exists on the page, so the browser opens the career page at the top and the person has to scroll to find what the search promised.Found on 2026-10-03 while drafting #692, which depends on the career page's anchors. It is not on the list of improvements of 2026-10-02.
What exists today
search_careerbuilds each hit's address asf"{overview}#{section}"(src/postulo/core/search.py:510), with the section named in the table of five models above it:"experience","education","projects","certifications","skills"(:467-490).<section id="section-{{ section.spec.slug }}">(src/postulo/templates/resume/overview.html:39), and its own sidebar links to#section-<slug>(src/postulo/resume/views.py:77-78). The slugs come from the registry:experience,education,project,skill-group,certification,link,language(src/postulo/resume/registry.py:28-80,OVERVIEW_ORDERat:83). The ids on the page are thereforesection-experience,section-education,section-project,section-skill-groupandsection-certification.src/postulo(no template, script or view defines an element calledexperience,education,projects,certificationsorskills), andstatic/js/app.jsdoes not readlocation.hash. A browser ignores a fragment that matches nothing, which is the failure described above. The two that look right,#experienceand#education, are missing thesection-prefix;#projectsand#certificationsare also plural where the slugs are singular.OVERVIEW_ORDERhasskill-groupand noskill. The target for a skill hit issection-skill-group.overview.html:71, the<li>of an entry carries none), so the section is the closest target the page offers today.tests/test_search.py:107), and the browser test of the career sections follows the sidebar's anchors, not a search hit (tests/e2e/test_career_sections.py:18-33).Checked against
mainat0df9c342e.Proposal
section-experience, education →section-education, project →section-project, certification →section-certification, skill →section-skill-group.modelis the hit's model inresume.registry.SECTIONSand buildf"section-{spec.slug}"from it (a skill goes to its group's section). A section renamed in the registry then cannot leave the search pointing at nothing, which is how this one came about: the search was written with its own names beside the page's.Decisions
scroll-margin-topthat clears the sticky header,--header-height) is a better result and a separate step if the maintainer wants it.search.py:467-490). Recommended: leave that out of this issue; it is a question about what the search should find, not about where it links.Done when
tests/test_search.py: a row of each of the five models is found, the fragment of its hit's address is an id on the career page (/career/), and the test fails today on all five.tests/e2e/test_career_sections.pygains one visit from a search hit: the target section is on screen below the sticky header, as it is for the sidebar's anchors.(#N).Related
#506 (search: the "All N in …" links), #676 and #677 (the account menu and the sub-menu of the same page), #692 (the additional career sections, which add sections to the page and its anchors).