Skip to content

Post as an organization you're in, as the web does - #182

Draft
simonhamp wants to merge 2 commits into
feat/commit-screenfrom
feat/post-as-org
Draft

simonhamp wants to merge 2 commits into
feat/commit-screenfrom
feat/post-as-org

Conversation

@simonhamp

Copy link
Copy Markdown
Member

On dev-null.sh a member of a GitHub organization can post as that organization. The avatar in the composer opens a "Post as" menu with you and your organizations. It's in the new commit composer, the Quote dialog and the reply composer. This brings the same thing to the app.

How the web does it (dev-null-sh/dev-null.sh#1361, #1375, #1377, #1492 and #1568 there):

  • Admins and members alike can post as an org. The choice is sent as author (the org's handle) on a commit, a quote, a reply or a scheduled commit. The server checks membership and refuses with "You can only post as an organization you are a member of."
  • GET /api/v1/me lists your organizations with your role, oldest membership first.
  • Commits come back with author.type = organization, the org's avatar, handle and lane. The org's commits show on its page, and notifications name the org as the actor.

The API already has all of this, so no server change is needed.

What changed

  • The organizations from GET /me are kept on the phone (Account::organizations()) and refreshed whenever /me is.
  • The composer sheet (new commit, quote, reply) shows who the commit goes out as above the field: avatar, name and handle. Tapping it opens a menu of you and your organizations, the current one ticked. People in no organization see nothing, as on the web. An issue draft (/feature, /bug) hides it, since issues always come from you.
  • The reply bar on a commit's page has the same avatar at the start of the row. Expanding into the reply sheet carries the choice over, and a change made in the sheet goes back to the bar.
  • Commit and Reply are filled with the org's lane while posting as it.
  • The choice rides in the outbox payload, so a staged commit or reply shows the org as its author straight away (square avatar, dashed ring in the org's lane).
  • A scheduled commit goes out as the org too, and the Scheduled list shows "As @handle" like the web.
  • When devnull turns a commit down (left the org, rate limited, offline) the usual toast shows and the draft comes back with the org still picked. A commit sent as an org also asks /me again, so if you've left the org the composer falls back to posting as you, which is what the web does.
  • Tapping an org's name or avatar in Notifications opens the org page instead of a user profile that doesn't exist.

Org-authored commits already drew as the web does before this (square avatar, org lane, tap opens the org page, #150/#152/#159). I checked them on the Log, the commit page, the org page and Notifications.

Things to know

Testing

  • 11 new tests in PostAsTest and one in NotificationsTest. Full suite: 1,906 passed, run serially.
  • iOS 27.0 sim (iPhone 18 Pro) and Android 35 emulator against a local dev-null.sh at upstream production (7513965a), light and dark. Test user is an admin of one org and a member of another, and not in a third.
  • On both: posted as myself and as each org from the composer, quoted as an org, replied as an org from the bar and from the reply sheet, saw staged org commits (with the API holding the request), and checked the result on the Log, commit page, org page and in Notifications.
  • Lost membership: picked an org, removed the membership on the server, sent. Toast, draft back, composer then showed me instead of the org, and sending again posted as me.
  • Offline: with the API stopped, a commit as an org came back with the org still picked, and went out as the org once the API was back.
  • Scheduling as an org is covered by tests only.

Screenshots

commit-page

iOS light iOS dark Android light Android dark
After

composer

iOS light iOS dark Android light Android dark
Before
After

composer-menu

iOS light iOS dark Android light Android dark
After

left-org

iOS light iOS dark Android light Android dark
After

log

iOS light iOS dark Android light Android dark
After

notifications

iOS light iOS dark Android light Android dark
After

offline

iOS light iOS dark Android light Android dark
After

org-page

iOS light iOS dark Android light Android dark
After

quote

iOS light iOS dark Android light Android dark
After

reply-bar

iOS light iOS dark Android light Android dark
Before
After

reply-bar-org

iOS light iOS dark Android light Android dark
After

reply-sheet

iOS light iOS dark Android light Android dark
After

staged

iOS light iOS dark Android light Android dark
After

The web, for comparison: Post as menu, light, dark, Log with org replies, org page, light, dark.

  • No visible change

🤖 Generated with Claude Code

The web lets a member of a GitHub organization post a commit, a quote or a
reply as that organization. The app now does too.

- GET /me's organizations are kept on the phone (Account), and refreshed
  whenever /me is.
- The composer sheet shows who the commit goes out as above the field. A tap
  opens a menu of you and your organizations. The reply bar on a commit's
  page has the same avatar at its start, and hands its choice to the reply
  sheet and back.
- The choice goes to devnull as `author`, which the API already takes, and
  rides in the outbox, so a staged commit shows the organization as its
  author. Commit and Reply use the organization's lane.
- A scheduled commit goes out as the organization too, and the Scheduled
  list says "As @handle" as the web's does.
- If devnull turns a commit down (you left the organization, or it's rate
  limited), the usual toast says why and the draft comes back with the
  organization still picked. The app asks /me again, and a composer whose
  organization is gone posts as you.
- Tapping an organization in Notifications opens its page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Puts post-as-org on top of #180's reply bar. The Post as avatar now
leads the row under the field through composer-box's lead slot, ahead
of the photo button. The round send button takes a colour, so Reply is
filled with the org's lane while replying as it.

The bar no longer opens the reply sheet, so the code that handed the
bar's choice to the sheet and back is gone. A reply sheet reopened for
an old sheet reply that devnull turned down still has Post as, starting
as you or as the org that reply was going out as.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@simonhamp
simonhamp changed the base branch from main to feat/commit-screen November 18, 2026 02:38
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