oliver-zehentleitner / maity
clean-up: G6 public-page leftovers: the person page repeats person_links' visibility rule and Discord test; a dead date fallback in campaigns
tsk-9h2xm089fb85 Done Maity Coder Claude 003
From the clean-up audit tsk-hgnbapyw7hnh (uncovered files, G6: CLI leftovers, public-page leftovers, tools and scripts), read at 9dfd4b65.
1. public_people.py decides by hand what person_links already knows (rule implemented twice)
- Files: hub/src/maity_hub/public_people.py:66 and :352 (
links_visible == "everyone", the anonymous reader's case ofperson_links.admitted, hub/src/maity_hub/person_links.py:176-197); :74 tells a Discord name from a link bystartswith("https://"), which isperson_links.address(...) is None(:121-136); :354-356 callsbuilt()only to filter the keys ofhuman.social. - What is wrong: a change to who may see links (a new value of
links_visible, a hold rule) or to which network has no address has to be found in a second file; the page and the visitors' route each spell it. - Proposal:
person_links.public(human) -> list[tuple[network, name, url | None]](empty unless the anonymous reader is admitted), used by_linksand_data. - Effort: S. Risk: low (the person page tests cover links on and off and Discord).
2. A fallback for a day that is never a string (dead code)
- Files: hub/src/maity_hub/campaigns.py:186
row.day.isoformat() if isinstance(row.day, date) else str(row.day)[:10];campaign_count.dayis aDatecolumn (hub/src/maity_hub/tables.py), which SQLAlchemy returns asdateon both SQLite and PostgreSQL. - Proposal:
row.day.isoformat(). - Effort: S. Risk: none.
Covered elsewhere
None for these. Reviewed and left: instance_counts.py, site_values.py, project_links.py, avatar_generated.py, motifs.py (its broad except around Pillow is the documented fallback).
Effort: 2S.