oliver-zehentleitner / maity

clean-up: web signed-out and public pages: one import rule, shared sign-up bar and password pair, dead exports, organisation page fixture

Sign in to report

tsk-qakd8fczebba Open

From the web clean-up audit, area 17 (tsk-hgnbapyw7hnh), read at 80647565 (findings sent to lotse, seq 125544). Line numbers are from 80647565, so re-check them on current main.

#67 Landing editor / site import: the same landing JSON follows different import rules (design).

  • Where:
  • landing.js:583-605 against site-io.js:89-98
  • legal shape check: landing.js:721-727 against site-io.js:109-113
  • LANG regex: landing.js:16 and site-io.js:27
  • slug/code regex: landing.js:19-20, register.js:43-44 and api.js:1125
  • For "enabled": "false", the editor coerces the value to true (landing.js:594), while site-io refuses a non-boolean (site-io.js:91).
  • For a missing default_language, the editor takes the first page key (landing.js:595), while site-io keeps the saved value (site-io.js:96) and refuses an empty one.
  • landing.js:589 claims the editor matches the import of the whole site.
  • The landing save body is built twice (landing.js:507-508 and 567-568).
  • Proposal: export one landing.normalizeImport(data, current) and one legal.shapeOk(langs), with the regexes as named exports. site-io and register call them.
  • Effort S. Risk low.
  • Open question: the editor would then refuse a non-boolean enabled instead of coercing it. Confirm that change.

#69 Register / password reset: header bar and password checks copied, guards for modules always loaded (duplication/debt).

  • bar() at register.js:18-21 and password-reset.js:14-17 is identical. invite.js:15 and app.js:475-499 are close variants.
  • PASSWORD_MIN = 12 is defined at register.js:12 and password-reset.js:10.
  • The length and repeat checks are at register.js:101-102 and password-reset.js:161-162.
  • Guards on M.brandTitle and M.themeMenu protect modules that index.html always loads.
  • Proposal: one M.signedOutBar(header) and one M.passwordPair({min, prefix}) that returns the inputs and a check(), used by register, reset and invite. Drop the guards.
  • Effort S. Risk low.

#71 Landing / person / auth-pages / password reset: four exports without a consumer (debt).

  • M.landing.TYPES (landing.js:783), M.person.links (person.js:113), M.authPages.LANGUAGES (auth-pages.js:153), M.passwordReset.PAGE (password-reset.js:210).
  • None of them is used in web/, web/tools or tools/.
  • Proposal: remove them from the export objects.
  • Effort S. Risk very low.

#72 Person page / fixture: the "hub renders no organisation page" workaround is obsolete (debt/docs drift).

  • Where:
  • web/context/views.md:3287-3309 and its line at web/context/index.md:75
  • api.js:2102-2106 (the fixture page_served)
  • hub public_orgs.py:28-67 (view organisation_page at :61), routes/people.py:197-199, docs/api.md:21365
  • The hub now renders the organisation page kind and computes page_served for organisations, so the "Revisit when" of that entry has been met.
  • The fixture still sets page_served from org.public_page == on alone, ignoring the hold and deletion rules (public_orgs.py:20-25), and its comment says the hub answers false.
  • Proposal: make the fixture follow the rule of the hub (on, not deleted, no hold), retire the views.md entry and its index line, and fix the comment.
  • Effort S. Risk low.

Notes

  1. Maity Coder Claude 003 · Nov 20, 2026, 11:54 UTC

    Audit round 3 (tsk-hgnbapyw7hnh), read at 588f911b: item #71 grew. Now the whole M.person export is unused: web/js/person.js:148 (M.person = { links, agentList }) has no reader anywhere in web/ (smoke.js included), since visitor.js stopped calling M.person.agentList (#1858). With it, agentItem (person.js:76-84) still reads both display_name/avatar_url and the visitor route's name/picture ("both are read"); only the signed-in GET /people shape reaches it now. Proposal: drop the M.person export entirely and read only the §6.27 fields in agentItem.