Skip to content

Bring native posting, notifications and profiles closer to web parity - #44

Merged
simonhamp merged 3 commits into
NativePHP:mainfrom
ricardovfreixo:feat/web-parity
Oct 20, 2026
Merged

simonhamp merged 3 commits into
NativePHP:mainfrom
ricardovfreixo:feat/web-parity

Conversation

@ricardovfreixo

@ricardovfreixo ricardovfreixo commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Bring the native iOS/Android client closer to the website by porting a batch of independently verified changes from the web repository's history. This is a bounded parity batch, not a claim of complete web/mobile parity.

#42 is merged. This branch now includes the latest upstream main through 8ce7482; Saved → Starred is already on the base branch and is no longer part of this PR's feature diff. The parity implementation is b88470e, with upstream conflict resolution in 74c6075.

Web commit → mobile implementation map

All source commits below are from nunomaduro/dev-null.sh.

Change Web source What this PR introduces on mobile
One-character commits and replies 1cc35cd — one char commits Lower the commit minimum from three characters to one. Apply the same rule to new commits, quotes and replies, both in button eligibility and submission handlers. Blank drafts remain invalid.
URL-aware character allowance and limits c6497df — discount URLs in commit character allowance, #805 Count valid prose URLs and bare domains as at most 23 characters toward the 4,000-character allowance. Preserve full destinations in submissions. Enforce 2,048 characters per URL and a 40,000-character normalized raw-body limit. Raise composer/reply input caps to accommodate discounted links, update all corresponding counters and disabled states, and show an explicit oversized-link validation message. Reserve reply-page clearance for that message.
Code-aware normalization and Unicode URL boundaries c6497df, #805 and the web's CodeSpans / commit.ts rules at that revision Normalize line endings and collapse repeated blank lines only in prose. Inline and fenced code, including their delimiters, count literally and do not receive URL discounts or prose URL-length validation. Count repeated links individually. Reject scheme matches embedded after Unicode letters, numbers, marks or connector punctuation. Reuse the normalization for preview-folding decisions.
Keep issue validation distinct from commit validation 1cc35cd, which explicitly retains the issue minimum, and c6497df, whose URL discounts apply to commits /feature and /bug drafts still require 3–4,000 literal characters. Their input caps, counters and submit eligibility do not inherit the one-character minimum or URL discounts. Private-message limits are unchanged.
Smart punctuation stays outside links a281ca4 — keep ellipses and curly quotes out of linked URLs, #765 Strip trailing …, ” and ’ from link destinations, alongside existing sentence punctuation. Preserve balanced URL brackets and keep punctuation as surrounding text.
Duplicate-submit protection 42f2f64 — ignore submits while a commit is being posted, #759 Add submission guards and loading/disabled state for commit/quote sheets and replies. A closed sheet cannot submit again after success. Reset pending state with finally, so failed submissions retain their drafts and remain retryable.
Notification actors open their profiles bf378fa — link the person in a notification to their profile, #515, followed by 3e55ca6 — preview and open profiles from notification actors, #570 Make actor names, handles, individual stacked avatars and expanded-group actors independently tappable. Open native profiles under the Notifications tab with the known user supplied immediately. The rest of the notification still opens its commit. Only actors present in displayed notifications/groups are valid targets; moderation rows keep their existing presentation.
Compact earned-achievement shelf 348537f — collapse profile achievement badges, #819 Show only earned badges on the profile shelf, with two visible chips and +N more for additional earned badges. Show View achievements when none are earned. Keep every earned/locked badge, progress, rank and badge inspection available through the native achievements sheet.
GitHub links in bios and company names be434e6 — tagged GitHub accounts in bios/company fields, #720 Parse tagged users/organizations using the website's mention boundaries. Render tappable inline handles in profile bios and company facts, opening the tagged account on GitHub, not a devnull profile. Exclude emails, paths, package names and invalid handles; use Unicode code-point offsets. Only accounts actually tagged in the displayed profile can be opened by the action.
Compact large counts, starting at 1,000 50b08bb — shorten counts from a thousand, not only above it, #445 Format visible star/pastel counts and profile commit/following/follower/pastel totals using lowercase compact units and at most one decimal, e.g. 1k, 12.5k, 1m. Handle rounding across unit boundaries. Keep full counts in existing star/pastel/follower accessibility labels.
Reply avatars ringed in their author's lane colour 799dc10 — ring reply avatars in their author's lane color Reuse the native rail-avatar component for replies. Give the 24pt reply slot a compact lane-colour ring and surface gap, without shifting the existing thread geometry. Preserve the larger rail-avatar sizing.

Upstream merge compatibility

The branch has been merged with upstream main after #42 and the row-rendering improvements in #41 landed. Conflict resolution preserves both implementations:

  • Keep Build a Log row from fewer nodes #41's flattened flex-row action pressables and existing touch-target dimensions, while retaining compact star/pastel text and full accessibility labels.
  • Keep Build a Log row from fewer nodes #41's positioned, border-based avatar ring, without restoring an extra wrapper disc. Retain the compact reply ring's 24pt outer slot, 1pt border/gap and 20pt avatar, plus the existing larger rail-avatar geometry.
  • Update touch-target and reply-ring assertions to verify the optimized tree. Upstream's row-node budget test and row-cache tests pass alongside the parity regressions.
  • Retain upstream's automatically merged first-frame, row-cache, reply-pagination and Remotes fixes.

Native adaptations and scope boundaries

  • Screens remain SuperNative/EDGE; no new webview-based screens, dependencies or native plugins are introduced.
  • Notification actor navigation provides an immediate native profile, not the website's mouse-hover preview.
  • The achievement shelf uses two visible earned badges plus a native sheet, rather than browser width measurement and a hover popover. Locked badges remain inspectable in the sheet.
  • Bio/company mentions are inline native text links. This ports the link behaviour; it does not recreate the web's inline avatar-pill styling.
  • The avatar change ports the author's lane ring. It does not claim to port SVG gradient connectors, hover effects or the website's full rail animation system.
  • Submission guards are not server-side idempotency or automatic recovery of an ambiguously completed request.
  • This PR does not implement uploads, poll voting, translations, live-stream controls or stargazer lists. The currently inspected signed mobile API does not expose the required endpoints for those features. It also does not port unrelated web-only analytics, moderation/admin UI, or desktop interactions.
  • No web repository changes or server migrations are required for this batch beyond the existing deployed web/API contracts and Replace saved bookmarks with starred commits #42's prerequisite.

Implementation guide

  • Draft validation and URL parsing: app/Devnull/Data/{Commit,CommitBody,BodyLink}.php; app/Devnull/IssueCommand.php.
  • Submission guards and forms: app/NativeComponents/Concerns/{OpensCommitSheet,DraftsIssues}.php, app/NativeComponents/CommitDetail.php, and the composer/reply/counter Blade views.
  • Actor navigation: app/NativeComponents/Notifications.php; notification, grouped-notification and stacked-avatar partials.
  • Achievements: app/Devnull/Data/Achievements.php; achievements shelf partial. The existing detailed sheet remains the inspection UI.
  • GitHub mentions: app/Devnull/Data/Mention.php, app/NativeComponents/Profile.php, and the GitHub-text/profile partials.
  • Count display: app/Devnull/Display.php; commit-action and profile-header partials.
  • Reply rings: rail-avatar and thread-reply partials.

Validation

  • Laravel Pint: passed.
  • Non-architecture tests: 1,076 passed, 1 skipped, 2 deprecated.
  • Architecture tests: 5 passed separately.
  • Total passed across split runs: 1,081. This is not a claim that the combined single-invocation runner passed; it previously terminated prematurely in architecture process isolation.
  • git diff --check: passed.

Coverage added or adapted includes:

  • One-character/blank drafts, Unicode counts, exact allowance boundaries, long/repeated/bare URLs, raw limits, literal inline/fenced code, prose-only blank-line normalization, smart punctuation and separate issue validation.
  • Composer/quote/reply input caps, counter/disabled-state agreement, full submitted destinations, oversized-link errors, reply-bar clearance, duplicate-submit guards and retryable failures.
  • Primary/secondary stacked actors, inline actor names, expanded notification actors and rejection of unknown actor targets.
  • Earned-only shelves, overflow/empty shelf actions, and preservation of complete badge/rank inspection.
  • Bio/company GitHub navigation, false-positive mention exclusions, Unicode offsets and rejection of absent targets.
  • Compact count thresholds/rounding, full star accessibility labels, and reply-ring geometry/colour on both platform component trees.

Device checks for reviewers

  • New commit, quote and reply: a one-character body, an over-budget draft and a long prose URL.
  • A URL over 2,048 characters: clear validation, no request, no obscured final reply.
  • Repeated submit taps and a rejected submission: no duplicate success; draft remains retryable after failure.
  • Notification row versus actor name/avatar versus expanded actor: each opens the intended target.
  • Profiles with zero, one and several earned badges; open all badges and ranks from the shelf.
  • Tagged GitHub accounts in bio/company fields, compact large counts and unchanged full accessibility labels.
  • Reply-avatar rings and thread alignment on iOS and Android.

Match one-character commits, URL-aware character budgets and URL parsing rules across native composers and replies, while keeping issue validation separate. Guard duplicate submissions and preserve retryable drafts.

Link notification actors and GitHub bio mentions, compact the earned-badge shelf and large counts, and frame reply avatars in their lane colour.

Refs: dev-null-sh/dev-null.sh#805, dev-null-sh/dev-null.sh#765, dev-null-sh/dev-null.sh#759, dev-null-sh/dev-null.sh#570, dev-null-sh/dev-null.sh#819, dev-null-sh/dev-null.sh#720, dev-null-sh/dev-null.sh#445.

Validation: Pint passed. Non-architecture tests: 1,063 passed, 1 skipped, 2 deprecated. Architecture tests: 5 passed separately.
Keep upstream's flattened action buttons and border-based avatar rings, retaining compact counts, compact reply-ring geometry, and regression coverage.
@simonhamp
simonhamp merged commit e3683ef into NativePHP:main Oct 20, 2026
1 check 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