Repository navigation
feat: add instance onboarding and pairing flow - #2
Conversation
- Add Flutter inviter setup page for configuring a server URL\n- Generate and display one-time pairing invitation links\n- Add Gin APIs for invite creation, redemption, and status checks\n- Enforce single pending invite and one-time redemption per instance\n- Add pairing service and HTTP integration tests\n- Remove the default server URL from onboarding\n- Add Dart and Go function documentation comments\n- Update the implementation guide and server documentation
- add reusable paper-and-ink UI components for pairing - accept invitations opened through the pawmate://pair deep link - store device credentials securely and restore access with rotating recovery codes - persist pairing state in SQLite and store credential hashes - document recovery and database backup procedures
- validate saved credentials on app startup and route paired users home - add authenticated pairing session endpoint - provide recovery flow for invalid credentials and retry handling for network errors - navigate invitees and newly paired inviters to the couple home - document session validation and recovery behavior
- generate launcher icons from the Pawmate SVG for Android, iOS, web, Linux, macOS, and Windows - add icon generation configuration and source PNG - add Flutter project scaffolding for the additional platforms
Add persisted text messaging with paginated history, retry-safe sends, cross-device synchronization, unread reminders, and member-level read receipts. Open the couple space on the Chat tab and retain drafts and scroll state between tabs.
…stem Add invitation-link entry and a login-method chooser, and refine pairing, device login, recovery, and chat screens. Split the hand-drawn UI into reusable components, layouts, theme tokens, and icons, with English and Chinese localizations. Update the foundation guide with onboarding previews and add tests for the login methods and onboarding screens.
Collect a nickname and optional avatar during invitation creation and acceptance, validate and persist profiles with pairing, and show both members' identities in Home. Localize profile flows and add profile-focused UI and service coverage. Replace the implementation guide with reference documentation for onboarding, pairing, API contracts, and persistence. Remove obsolete draft instructions and book figures.
Add a scheduled and manually triggered workflow that runs CI, builds platform-specific Flutter clients and Gin server packages from the same commit, and publishes checksum-verified draft prereleases. Document supported artifacts, installation caveats, and release behavior in the README and project book.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cc14f7669e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return func(c *gin.Context) { | ||
| var request recoverPairingRequest | ||
| if err := c.ShouldBindJSON(&request); err != nil { |
There was a problem hiding this comment.
Cap unauthenticated recovery request bodies
When the server is reachable by an untrusted client, /api/v1/pairing/recover passes an unlimited body to ShouldBindJSON, so a caller can force the process to buffer or parse an arbitrarily large payload and exhaust memory. The invite handlers already use http.MaxBytesReader; apply a small bound here as well (and to the similarly unauthenticated device-code redemption handler).
Useful? React with 👍 / 👎.
| <key>CFBundlePackageType</key> | ||
| <string>APPL</string> |
There was a problem hiding this comment.
Register the invitation scheme on iOS
On iOS, tapping a generated pawmate://pair?... invitation cannot launch this app because the new Info.plist contains no CFBundleURLTypes entry for the pawmate scheme; the Android manifest is the only platform registration found in the repository. uriLinkStream only receives links delivered by the OS, so the external invitation flow is unreachable on iOS until the scheme is registered.
Useful? React with 👍 / 👎.
| if (messageBounds.overlaps(bounds) && entry.key > visibleID) { | ||
| visibleID = entry.key; | ||
| } |
There was a problem hiding this comment.
Do not acknowledge off-screen unread messages
When a user opens Chat with enough unread messages to span beyond the viewport, selecting the greatest visible incoming ID advances the server's cumulative cursor past every earlier message, including unread bubbles still off-screen above the viewport. This immediately tells the partner those messages were read and clears their unread count even though the UI promises acknowledgment only after rendering them visibly; the client must avoid advancing across unseen unread IDs.
Useful? React with 👍 / 👎.
| Text( | ||
| own ? 'You' : 'Your partner', | ||
| style: Theme.of(context).textTheme.labelMedium, |
There was a problem hiding this comment.
Localize the chat sender labels
When Simplified Chinese is selected, every message bubble still displays the English labels You or Your partner, producing a mixed-language primary chat screen. Add both labels to the English and Chinese localization resources and resolve them through AppLocalizations like the surrounding status text.
AGENTS.md reference: AGENTS.md:L182-L185
Useful? React with 👍 / 👎.
Resolve pairing, device, and chat endpoints relative to the configured instance URL so deployments hosted under paths such as `/pawmate` keep that prefix.
Reject HTTP instance URLs in release builds and disable Android cleartext traffic by default. Allow HTTP only in the debug manifest, and update localized errors, tests, and server documentation to reflect the policy.
Cap recovery and device login code redemption payloads at 8 KiB to prevent oversized requests from consuming excessive memory.
Allow HTTP instance URLs in all client build modes and enable Android cleartext traffic. Document that HTTP is unencrypted and best suited to trusted private networks or tunnels.
Summary
This PR introduces the first end-to-end PawMate onboarding and pairing flow, including client-side onboarding screens, pairing/session handling, device management, basic chat integration, server-side pairing APIs and persistence, localization, design-system components, and supporting documentation/tests.
Highlights
Notes
The branch is 12 commits ahead of
mainwith no divergence at the time of PR preparation.