oliver-zehentleitner / maity
web: person and visitor pages share one networks table and avatar/size helper; visitor.js uses its own headcount, one tab bar, one agent test
tsk-4p5151s9p1e5 Open
Audit round 3 (tsk-hgnbapyw7hnh), read at 588f911b. Kind: duplication / design.
Between person.js and visitor.js
- Identical
NETWORKStables:web/js/person.js:23-26andweb/js/visitor.js:326-329;REL_MEdiffers (person.js:27hasnoopener,visitor.js:330not). - Picture with an error fallback:
person.js:47-57andvisitor.js:146-158; the?s=size suffix atperson.js:83andvisitor.js:149. - Two link rules: person.js shows the links the hub builds (
social[net]is a URL); visitor.jsSOCIAL(:314-325) builds URLs in the browser from names, a copy ofhub/src/maity_hub/person_links.py.
Inside visitor.js
teamSectionrepeatsheadcount()inline (:202-206vs:248-252).tabBarrepeats the old nav'saria-currentlogic (:298-303vs:683-688).- "Is this member an agent" two ways: membership in
d.agents(agentPages(d),:160) vs a regex on the hub's URL layout (isAgentPage,:246). FORGE_HOSTS/githubMark(:107-123,:265-266) name the button "GitHub"/"GitLab" by host with its own copy of the GitHub mark (alsoweb/js/app.js:304), while app.js keys the forge onproject.forgeand says "Repository" (views.md decision 10a77061).
Proposal: one shared helper module (NETWORKS, REL_ME, avatar(url, px, fallback), sized(url, px)); later let the hub send built links in the public data and drop SOCIAL. In visitor.js: use headcount(), one viewTabs(answer, base, cls), one agent test, one forge table shared with app.js; the hero button text is a visible change, so ask the lead.
Effort / risk: S for the helpers, M for the hub field. Low risk.