Skip to content

[Guilds 05] Open a guild from its hashtag in a commit or message - #211

Merged
simonhamp merged 1 commit into
NativePHP:mainfrom
shanesmithdev:guilds-05
Nov 26, 2026
Merged

simonhamp merged 1 commit into
NativePHP:mainfrom
shanesmithdev:guilds-05

Conversation

@shanesmithdev

@shanesmithdev shanesmithdev commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Status: Draft. Waiting on new iOS screenshots.

This follows on from Guilds 04 (#210), which is merged. It uses the guild mentions dev-null.sh now sends with every commit and message, which are merged and live.

What's in this PR?

  • A hashtag that names a guild opens the guild, instead of a search for it, as on the web. Any other hashtag still searches.

    • A commit posted in a guild treats that guild's own hashtag the same way, as the web does
    • It works in the Log, profiles, guild boards, commit pages, reply previews, scheduled commits and Remotes messages. Quoted commits are drawn as plain text, so their hashtags aren't tappable, as before
    • The composer's preview keeps hashtags as plain text, as before
  • In a commit, a guild's hashtag shows as a pill, like the web's guild mention and the "posted in" pill: the guild's mark (its uploaded icon, otherwise its emoji), then its name in mono, in a rounded tag on the wash.

    • Text can't hold an image, so a line with a guild in it is drawn as a wrapping row of words and pills, the same way a bio draws the accounts it tags. The other lines of the paragraph stay ordinary text, so they look exactly as before
    • Words in that row keep their look and tap: mentions, links, code, hashtags, hex colours and the /dev/null wordmark
    • Pills on wrapped lines have a small gap between them
  • In a Remotes message, a guild's name is mono in the bubble's link colour, without the background, as inline code is there. A guild's own colour could match the colour of your bubble.

Testing

Pest tests cover:

  • a guild hashtag in a commit showing as a pill with its emoji or uploaded icon and name, opening the guild, matched whatever its case, beside a hashtag that still searches;
  • the words around a pill keeping their kind (mention, code, link), and a paragraph's lines without a guild staying text, blank lines included;
  • links after a line of pills keeping their numbers;
  • a commit's own guild hashtag, with no guild mentions sent, and devnull's name winning when the commit only knows that guild's handle;
  • a guild hashtag in a Remotes message.

Locally, the tests for the commit, guild, log, profile, search and conversation screens and the unit tests pass (1,008). Checked by hand on an Android phone, with a commit mentioning 21 guilds.

Independent review

A fresh reviewer, who hadn't seen the work being built, read the first version of this commit, which drew guilds as coloured text. It found one bug, now fixed:

  • A commit's own guild could hide its real name. When a commit arrived with only its guild's handle, the app stood in a placeholder named #rust, which replaced the real name devnull sent in its guild mentions, so the chip read "#rust" instead of "Rustaceans". devnull's name now wins, and a test covers it.

And a few smaller points:

  • A commit you've just posted to a guild shows its own hashtag as a search link until devnull has it, then as a pill.
  • Tests could cover more: scheduled commits, a folded preview, a reply in a thread, and the composer preview staying plain.
  • Opening a guild doesn't URL-encode its handle. That's how it already worked from the directory and the "posted in" pill. It only matters if devnull ever allows handles outside plain letters, digits and underscores.

The pills replaced the coloured text after that review, so they haven't had one of their own yet.

Screenshots

New screenshots to come: Android is taken, and iOS waits on an Xcode update (the app needs the iOS 27.2 SDK to build). The ones that were here showed the earlier coloured text.

A hashtag that names a guild now opens the guild instead of a search.
Any non-guild hashtag still opens search instead.
@simonhamp
simonhamp marked this pull request as ready for review November 26, 2026 16:41
@simonhamp
simonhamp merged commit 2d16db1 into NativePHP:main Nov 26, 2026
4 of 5 checks passed
simonhamp added a commit to shanesmithdev/dev-null-app that referenced this pull request Nov 26, 2026
Main now has NativePHP#211 as it was merged, so the older draft of it on this
branch gives way. Commit.php, commit-body.blade.php and
CommitDetailTest.php take main's version.

GuildTest.php had a second copy of the join and leave tests from the
last merge, so Pest refused to run the suite. It's back to what the
guild menu commit intended: main's file without the share test, which
moved to GuildMenuTest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants