Skip to content

Open dev-null.sh links in the app instead of the browser - #95

Merged
simonhamp merged 1 commit into
mainfrom
feat/devnull-links-in-app
Oct 27, 2026
Merged

simonhamp merged 1 commit into
mainfrom
feat/devnull-links-in-app

Conversation

@simonhamp

@simonhamp simonhamp commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Tapping a dev-null.sh link inside the app now opens the app's own screen when there is one, instead of the in-app browser. Before this, only a commit link in a commit's body did that.

What opens in the app now, in the tab you tapped it in:

  • /@user opens their profile
  • /@user/followers and /@user/following
  • /@user/commits/{id}, and a commit's /photos/{n} page, open the commit
  • /remotes/@user and /remotes/orgs/{id} open the Remotes thread

The new App\Devnull\SiteLink class does the URL-to-screen mapping. It's used for links in a commit's body, a commit's link preview card, a Remotes message's link preview card and a profile's website. Anything without a screen, like a profile's feed or og.png, the settings or the Remotes inbox, still opens in the browser.

Things to look at:

  • The host check accepts dev-null.sh, www.dev-null.sh and whatever DEVNULL_URL points at. Lookalikes like dev-null.sh.evil.com, and URLs with a user or password before the host, give no screen and go to the browser as before.
  • SiteLink uses Connections::Types, so it's the first class in App\Devnull that imports from App\NativeComponents.
  • Open dev-null.sh links in the app #46 has its own copy of this map in WebLink::Screens. It could use SiteLink once one of the two lands.

Screenshots

The test data comes from a local API, so in the before shots the in-app browser opens production dev-null.sh, where the local user doesn't exist. That's why it says "There's nothing here".

log

iOS light iOS dark Android light Android dark
Before
After

Recordings: iOS dark, after, iOS dark, before, iOS light, after, iOS light, before

No Android shots. The app builds and runs on the emulator, but signing in goes through Chrome, and Chrome on a fresh emulator stops at its first-run screen. The change is all PHP with no platform-specific code, and both platforms push screens through the same openInTab().

  • No visible change

🤖 Generated with Claude Code

Tapping a link to a profile, its followers or following, a commit (or one
of its photos), a Remotes thread or an org now opens that screen in the
tab you're in. Until now only a commit link in a commit's body did that,
and everything else went to the in-app browser.

SiteLink maps a dev-null.sh URL to the app's path under a tab. It's used
for links in a commit's body, a commit's link preview, a Remotes message's
link preview and a profile's website. Anything the app has no screen for,
like a profile's feed or the settings, still opens in the browser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@simonhamp
simonhamp marked this pull request as ready for review October 27, 2026 14:27
@simonhamp
simonhamp merged commit 28901ad into main Oct 27, 2026
4 checks passed
@simonhamp
simonhamp deleted the feat/devnull-links-in-app branch October 27, 2026 14:29
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.

1 participant