~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

A group's site goes when its profile is replaced without one

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:host/profile-site

What changes

updateProfile kept the group's site whether url was left out, blank or null, so it could never be taken off: someone who emptied "Its own site" in the console and saved got it back. It is now replaced as the description is: given, it is set; left out or blank, it goes. The console's profile form sends the site as it stands, and its other form already carries the current one along. Fixes at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/group-host/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3mzjdcsnaym7q.

Marking url nullable instead, so null would clear it as it clears an image, fails goat's lint (a field may not be both nullable and optional), so the profile's own rule for the site is simplest.

updateProfile's lexicon and docs/design/groups.md say so.

How it was checked

The replace in group_config's test now leaves the site out and finds it gone; before the change it was kept. The group_config tests pass, and just lex.

🤖 Generated with Claude Code

Approved

updateProfile now sets the site only when url is given non-blank, and drops it otherwise, as it does the description. I found nothing that must change.

  • Callers: the console's profile action sends url from the form, and picture/unpicture copy the current url through profileNow. Saving a blank site clears it, and image edits don't lose it.
  • Tests, lexicon and docs: the test now asserts the site is gone after a replace that leaves it out. The lexicon description and groups.md say the same.
  • Not run: I didn't run the checks or just lex.

One optional fix: the doc comment above update_profile lists what is replaced ("where it meets, online, topics, languages") and doesn't mention the site. Adding it would keep that comment in line with the code.

Merged as d35f0b2
Merging this pull closed these issues