Skip to content

Fix the app treating organization commits as someone else's - #208

Open
shanesmithdev wants to merge 3 commits into
NativePHP:mainfrom
shanesmithdev:fix-org-commit-reactions
Open

shanesmithdev wants to merge 3 commits into
NativePHP:mainfrom
shanesmithdev:fix-org-commit-reactions

Conversation

@shanesmithdev

@shanesmithdev shanesmithdev commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Status: Blocked by #214. Merge it first: this branch is built on it, for the CommitDetailTest fix.

The /dev/null web application counts a commit as yours when you wrote it, or when an organization you're a member of posted it. The app only checked whether you wrote the commit, and treated organization commits as someone else's instead.

On your own organization's commits, the app offered the wrong actions:

  • Star: tapping it showed "This action is unauthorized." Now, as on your own commits, the star is the count, and it opens a list of people who starred the commit.
  • Report commit: it was in the menu, but you don't want to report your own organisation's commit.
  • Delete commit: it was missing from the menu, and from the commit page's top bar. It's there now.
  • Quote: a commit by your organization can now be quoted, even if it's still waiting for approval. The web app allows this, and so the app does now as well.
  • Polls: the app offered a vote on a poll another organization member posted, and devnull refused it ("You can't vote on your own poll."). Now it doesn't offer that any more, so it's consistent with how the web app works.

Pin to profile stays only on commits you wrote, since devnull only lets the author pin their personal commits.

The app learns your organizations from GET /me, which already lists them. Account::owns() is now the one place within the app code that decides whether a commit is yours.

Opening organizations tagged in a bio or company field was part of this PR too. #181 has since done the same on main, so that commit was dropped when this branch was rebased.

Review

An independent review found one bug, now fixed: the Quote button showed on a pending organization commit, but tapping it did nothing. It also noted:

  • Until the app has loaded /me once after signing in, your organization's commits still look like someone else's. It's only what's shown, as devnull checks every action.

Screenshots

Star on a commit from your organization (PHPxADL)

Before, an error. After, who starred it, and the commit page's top bar has Delete.

iOS light iOS dark Android light Android dark
Before
After

More on a commit from your organization

Report commit is replaced by Delete commit.

iOS light iOS dark Android light Android dark
Before
After

Polls: no screenshots. The fix only shows on a poll that another member of your organization posted, which you haven't voted on. devnull shows a poll's results to whoever posted it, so on a poll you posted yourself, before and after both show the results with no Vote button. There wasn't such a poll to capture. PollVoteTest covers it.

@shanesmithdev
shanesmithdev marked this pull request as ready for review November 23, 2026 07:47
@shanesmithdev

Copy link
Copy Markdown
Contributor Author

With 73 new commits (!!!) on main, this is now conflicting. Working on it.

@shanesmithdev
shanesmithdev force-pushed the fix-org-commit-reactions branch from b19c284 to ce9bc3e Compare November 24, 2026 15:05
@shanesmithdev shanesmithdev changed the title Fix the app treating organization commits and bio tags as someone else's Fix the app treating organization commits as someone else's Nov 24, 2026
@shanesmithdev
shanesmithdev force-pushed the fix-org-commit-reactions branch from ce9bc3e to 9812d16 Compare November 24, 2026 15: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