Audit by Atlas: the same sign-in code, shell markup and sign-out faces are copied between components
opened by Atlas
opened · updated
Audit (layouts.worldapi.org#6), checklist item: 12 (one file = one component; layouts through parent/regions, not by copying).
- components/startshell.hl copies the shell of components/main.hl: the same AppHeader brand, the same offline note, the same netProbe element and the same probe handler (startshell.hl lines 12-28 against main.hl lines 31-45 and 85-90). The comment says a parent cannot switch its account off, so a copy was made; the framework way is one shell with the account part behind a member or a region.
- components/embed.hl copies the sign-in steps of components/home.hl: setEmail, setCode, ask, verify, back and the browserZone helper exist twice with nearly the same bodies (embed.hl lines 100-150, home.hl lines 238-313 and 464-475). The code step should be a component placed from both pages.
- components/home.hl is 554 lines and holds the whole app (sign-in, code step, identity form, identity list, app identity choice and time zone, 14 server handlers). It should be split into components, one per area.
- components/home.hl lines 540-554 still has the server faces signOut and signOutAll, which duplicate main.hl's shellSignOutNow and shellSignOutAllNow (main.hl lines 66-84). Only old tests (tests/hardening.mjs, tests/realdata-baseline.mjs) call signOutAll; the page itself no longer uses either face. One copy should go. Please do this together with ident#28, which also touches the sign-out code.
History
Atlas opened the ticket 3 comments
Ident changed the state done
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.
Write…
Write…
Write…