oliver-zehentleitner / maity
clean-up: G7 landing routes and assets: an unreachable badge branch, a stale "Draft" header, duplicated page rules in public-pages.css
tsk-g897yh3qkj4w Open
From the clean-up audit tsk-hgnbapyw7hnh (uncovered files, G7 sign-in, joining, landing and notification routes), read at 9dfd4b65. Every line number is at 9dfd4b65. Paths are under hub/src/maity_hub/.
The module code of area 11 is on tsk-tnetc5fgr7pm. This card is routes/badges.py and landing_assets/. routes/landing.py and badge_template.py gave nothing new (see "Covered elsewhere").
1. Dead code: the badge's else branch cannot run, and the policy list is written twice
- Kind: dead code, duplication.
- Files:
routes/badges.py:44-46answersnot_found(with the shared budget) unless_served(:63-64) is true, and_servedadmits onlymembersandagents_online. So:52-53(else: # an unrecognised stored policy never makes a project public) never runs; the two policy names are listed at:48-51and again at:64. - Also:
limit_sourceandlimit_not_served(:24-36) are public names with no caller outside the module. - Proposal: keep one list of served policies (for example
badges.POLICIES), drop the dead branch or make it the only check, and make the two limit helpers private. - Effort: S. Risk: none (the not-served path keeps its shared budget).
2. Docs drift: public-pages.css still calls itself a draft
- Kind: docs drift.
- Files:
landing_assets/public-pages.css:1-2("Draft: pages without a session …"). The sheet is served at/assets/landing/public-pages.css(landing_files.py:99-101) for login, register, the legal pages,/exploreand the stored public pages, and the dashboard links it (web/js/site-chrome.js:17). - Proposal: replace the header with what the sheet is for now (the door, the legal and stored pages,
/explore, in the landing's tokens). - Effort: S. Risk: none.
3. Duplication: the join page repeats the stored page's table and quote rules
- Kind: duplication.
- Files:
landing_assets/public-pages.css:141-143(.stored-page table,th, td,blockquote) and:166-168(.join-pagewith the same three rules, byte for byte). - Proposal: one rule each with both selectors (
.stored-page table, .join-page table…). - Effort: S. Risk: none (web smoke reads this file at web/tools/smoke.js:16797 only for the narrow-panel rule).
Checked, no finding
landing_assets/public-pages.css:22,:58and:61set dark values only under[data-theme="dark"]. That is not a dark-mode gap: the elements they style (.flag.session-ended,.send-status) exist only on the dashboard, where web/css/app.css:31-32, :52, :99-100 and :110 define--flag-bg,--error-bgand--fieldfor both themes and for the system setting.badge_template.pyrepeats the word mark's path in both templates; hub/context/serving.md:123-131 records that the templates are byte-for-byte copies of the approved brand files, so that stays.
Covered elsewhere
- The
If-None-Matchhandling inroutes/badges.py:57-59: tsk-k25qqhygend8. public, max-age=60asroutes/badges.py:21CACHE, and the frame reads inroutes/landing.py:118and:166-169: tsk-tnetc5fgr7pm items 4 and 1.routes/landing.py:23-25_require_admin: tsk-hbpjgp03esez item 1.
Effort sum: 3 S.