Skip to content

Open mentioned GitHub organizations in their own screen - #122

Merged
simonhamp merged 2 commits into
NativePHP:mainfrom
rohitsasi720:feat/organization-mentions
Oct 28, 2026
Merged

simonhamp merged 2 commits into
NativePHP:mainfrom
rohitsasi720:feat/organization-mentions

Conversation

@rohitsasi720

@rohitsasi720 rohitsasi720 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

This reads GET /api/v1/organizations/{handle}, which dev-null-sh/dev-null.sh@f8e60e29 added and is already live on production, so it doesn't depend on any other PR.

dev/null now links @laravel-style mentions of GitHub organizations (dev-null-sh/dev-null.sh#1262), and the API marks each mention as a user or an organization. The app ignored that and sent every mention to a profile, so tapping @laravel opened a dead profile: "No query results for model [App\Models\User] laravel".

The app now opens an organization mention in an Organization screen beneath the tab. It's laid out like the web's organization page:

  • the GitHub avatar as a rounded square
  • the name, then @handle with an Organization badge
  • the bio, website and GitHub link (the links open in the in-app browser)
  • the web's "Organization pages are new…" note

When devnull can't send the organization, the screen says "This organization's page didn't load here" and links to the page on the web. It leaves out the usual red error line, because the fallback already says what happened.

  • Mentions: Mention reads kind, and BodyRun carries it. The commit and Remotes message bodies call openOrganization() for organization runs and openProfile() for the rest.
  • Organization screen: Organization loads through RefreshesInBackground like the other pushed screens. It shows the kept copy at once, then refreshes. organizations/{handle} is added to the cacheable paths.
  • Route: {tab}/organizations/{handle} is registered under each tab, next to {tab}/users/{username}.

Screenshots

Android only, from a Pixel 9. No iOS simulator runtime is installed on this Mac, so there are no iOS shots.

Tapping @laravel in a commit. Before: a dead profile. After: the fallback, shown when devnull can't send the organization. These were taken before the endpoint reached production. Now it shows for, say, an offline phone with nothing cached, or a handle typed in a different case, since production matches the case exactly.

Android light Android dark
Before
After

The organization page. These were taken before the endpoint reached production, with the app showing a cached copy of the response. That copy has the same fields production now returns for laravel (production also sends github_url and html_url, which the app reads like a user's).

Android light Android dark
After
  • No visible change

Tests

  • OrganizationTest (new): the page as the API sends it, with its links, and the fallback with its web link.
  • LogTest and ConversationTest: an organization mention opens /{tab}/organizations/{handle} and a user mention still opens the profile.
  • On the touched screen tests (ProfileCacheTest included) plus tests/Unit, Pest passes 440, with 1 failure. That one is LogTest › "shows the following log in tab", which fails on main too: it expects 5m but the clock runs on to 6m.
  • The full suite can't run on main right now. writesSent() is declared in both OrgMembersTest and OutboxTest (Manage an org's members and leave it from its thread #101 and Keep quick star and unstar taps in the order you made them #100), which is a fatal redeclare. That isn't fixed here.

A mention now says whether it names a user or a GitHub organization, and
tapping @laravel opened a profile that devnull doesn't have: "No query
results for model [App\Models\User] laravel". An organization mention now
opens an Organization screen beneath the tab, drawn like the web's page
from GET /api/v1/organizations/{handle} (dev-null-sh/dev-null.sh#1268).
Until devnull has that, the screen offers the page on the web.
The page says itself when it didn't load, and offers the page on the web.
@rohitsasi720
rohitsasi720 force-pushed the feat/organization-mentions branch from 984df7a to b171a96 Compare October 28, 2026 19:28
@simonhamp
simonhamp merged commit e34e19e into NativePHP:main Oct 28, 2026
4 checks passed
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