Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
26ad118
docs: friends feature hardening & completion design spec
Jshewmaker Jul 3, 2026
0ffcf72
docs: revise friends design — direct Firestore + rules first, functio…
Jshewmaker Jul 3, 2026
efce3a4
docs: implementation plan A — friends backend foundation
Jshewmaker Jul 5, 2026
5c23049
chore: scaffold Cloud Functions package and Firebase emulator config
Jshewmaker Jul 5, 2026
e77ce3b
feat: versioned Firestore rules v1 with private-credentials lockdown …
Jshewmaker Jul 5, 2026
b87b8d1
feat: pure PIN hashing and lockout logic for Cloud Functions
Jshewmaker Jul 5, 2026
cdb026f
fix: recordFailure no longer extends an active PIN lockout
Jshewmaker Jul 5, 2026
fe72617
feat: rate-limited validatePin callable with friend gating and legacy…
Jshewmaker Jul 5, 2026
0183269
fix: read PIN credentials inside the validatePin transaction; reject …
Jshewmaker Jul 5, 2026
dfa2129
feat: PinValidationResult model and UserProfileModel.hasPin/isComplete
Jshewmaker Jul 5, 2026
23113ce
feat: salted PIN storage in private credentials with lazy legacy migr…
Jshewmaker Jul 5, 2026
d70566c
feat: validatePin repository call routes through the Cloud Function
Jshewmaker Jul 5, 2026
2b8aede
feat: typed PIN error states with lockout and offline handling in pla…
Jshewmaker Jul 5, 2026
8cd30d3
docs: correct sha256 test constant in plan A (caught during Task 3)
Jshewmaker Jul 5, 2026
493f443
feat: onboarding PIN writes to private credentials and closes empty-P…
Jshewmaker Jul 5, 2026
f1c5ea6
fix: set PIN credentials before marking onboarding complete
Jshewmaker Jul 5, 2026
1357d4d
feat: migrate legacy PIN hashes to private credentials on login
Jshewmaker Jul 5, 2026
a8a6b72
chore: verify friends backend foundation; add plan index and deploy gate
Jshewmaker Jul 5, 2026
3aa373f
fix: final-review fixes — offline-safe migration, legacy PIN preserva…
Jshewmaker Jul 5, 2026
871e0cd
docs: implementation plan B — legacy gate and server-side game sync
Jshewmaker Jul 5, 2026
1de2aa8
feat: PinNotSet result surfaces friends without a PIN distinctly from…
Jshewmaker Jul 5, 2026
80480fe
test: restore named permission-denied coverage for validatePin mapping
Jshewmaker Jul 5, 2026
0bcbee2
fix: migrateLegacyPin repairs a wiped hasPin flag from old-client pro…
Jshewmaker Jul 5, 2026
d4ad833
feat: onboarding gate requires username and PIN via UserProfileModel.…
Jshewmaker Jul 5, 2026
04f41b1
feat: onGameCreated trigger fans games out to host and linked players
Jshewmaker Jul 5, 2026
0b5015d
feat: matches writes are owner-only; rules header documents staged ha…
Jshewmaker Jul 5, 2026
66d5b63
feat: game-over guard for linked slots; fan-out moves fully server-side
Jshewmaker Jul 5, 2026
ad82acb
feat: game-over account picker excludes linked slots, adds not-playin…
Jshewmaker Jul 5, 2026
5f46d7f
chore: verify friends plan B; update index and deploy gate
Jshewmaker Jul 5, 2026
037f57e
test: pin the offline fallback of the completeness gate; record Plan …
Jshewmaker Jul 5, 2026
96aefd6
docs: implementation plan C — social graph hardening and blocking
Jshewmaker Jul 5, 2026
6c14552
fix: harden onGameCreated against injected ids; games create requires…
Jshewmaker Jul 5, 2026
2c7fbf3
test: restore cross-user games read assertion dropped by the create-r…
Jshewmaker Jul 5, 2026
1d7d645
feat: deterministic friend-request ids with declined retention and si…
Jshewmaker Jul 5, 2026
338a8e2
feat: rules lifecycle matrix for friend requests, friendship edges, a…
Jshewmaker Jul 5, 2026
84a61b4
fix: pending-only request deletes and edge userId-key integrity (C3 a…
Jshewmaker Jul 5, 2026
42c8d63
feat: block-aware searchByFriendCode callable with relationship status
Jshewmaker Jul 5, 2026
c31ba78
docs: record the fail-closed friend-edge read direction in searchByFr…
Jshewmaker Jul 5, 2026
6f17c75
feat: client blocking operations and callable-backed friend-code search
Jshewmaker Jul 5, 2026
3bd76e5
chore: hold analyzer gate — typed matchers and documented ignore in C…
Jshewmaker Jul 5, 2026
a706510
feat: blocking UI — block from friends list, blocked-users management…
Jshewmaker Jul 5, 2026
931f4f7
fix: localize the unblock confirmation dialog (C6 review)
Jshewmaker Jul 5, 2026
00820c8
chore: verify friends plan C; update index and rules header
Jshewmaker Jul 5, 2026
c43def2
fix: plan C review — query-based request guards, pending+block-gated …
Jshewmaker Jul 5, 2026
0aae4d6
docs: implementation plan D — profile completion and cleanup
Jshewmaker Jul 5, 2026
0c78c6a
feat: onUserDeleted trigger cleans the social graph, keeping shared g…
Jshewmaker Jul 5, 2026
a0b5e68
fix: game-over save failures surface before navigation; disowned slot…
Jshewmaker Jul 5, 2026
620e040
fix: drop concurrent game-over submissions to prevent duplicate game …
Jshewmaker Jul 5, 2026
b24f3c3
chore: adopt includeIfNull:false across firebase_database_repository …
Jshewmaker Jul 5, 2026
fa8b74c
feat: profile page on UserProfileModel with PIN change and friend-cod…
Jshewmaker Jul 5, 2026
4d68759
fix: missing profile doc surfaces as failure; race-guard test (D4 rev…
Jshewmaker Jul 5, 2026
868fc4b
fix: replace droppable with a status guard — transformer cancellation…
Jshewmaker Jul 5, 2026
5c61fda
fix: reverse-pending wins over declined suppression; anonymous states…
Jshewmaker Jul 5, 2026
111cc1e
fix: removeFriend deletes both friendship edges atomically (D5 review)
Jshewmaker Jul 5, 2026
6fddfc0
chore: localize remaining friends-feature strings; rewrite stale feat…
Jshewmaker Jul 5, 2026
f98abbb
chore: verify friends plan D; close out index
Jshewmaker Jul 5, 2026
c30199d
fix: plan D review — collection-group indexes, username gate, profile…
Jshewmaker Jul 5, 2026
b8f7ec8
docs: index-deploy export gate and final follow-up notes (merge-gate …
Jshewmaker Jul 5, 2026
0c15dfa
fix: bump firebase devDependency to v11 to satisfy rules-unit-testing…
Jshewmaker Jul 5, 2026
9cefad6
docs: record the partial-deploy IAM-invoker gotcha that caused the fr…
Jshewmaker Jul 5, 2026
d08c350
docs: spec for player owner + friend selector redesign
Jshewmaker Jul 6, 2026
3d98b81
feat: add isPinValidating loading state to PlayerCustomizationBloc
Jshewmaker Jul 6, 2026
8713b91
fix: PIN dialog shows a loading spinner and stays reachable on small …
Jshewmaker Jul 6, 2026
27e8362
fix: restore genuine small-screen keyboard regression test for PIN di…
Jshewmaker Jul 6, 2026
c26e363
fix: work around Swift 6.3 async-let compiler bug crashing FirebaseFu…
Jshewmaker Jul 6, 2026
e0f9d92
feat: search friends by name, clarify identity fields, and simplify f…
Jshewmaker Jul 6, 2026
c11e1ba
fix: scope small-screen PIN dialog test to the structural fix, not ta…
Jshewmaker Jul 6, 2026
7faa703
feat: add OwnerSelected event, enforce owner/friend mutual exclusivity
Jshewmaker Jul 6, 2026
fd1c15b
fix: lock and populate the player name field for the owner link too
Jshewmaker Jul 6, 2026
8d4b181
fix: rehydrate owner/friend link state when reopening an already-link…
Jshewmaker Jul 6, 2026
70b41bd
feat: replace the friend tile list with a searchable Me/friend/unlink…
Jshewmaker Jul 6, 2026
c5a3559
fix: address analyzer lints found in the final whole-branch review
Jshewmaker Jul 6, 2026
a890bfd
docs: friends-flow review spec — username-only identity and name cleanup
Jshewmaker Jul 7, 2026
88547d3
docs: implementation plan — username-only identity cleanup
Jshewmaker Jul 7, 2026
1956311
style: theme the friend dropdown for the dark surface and move clear …
Jshewmaker Jul 7, 2026
0fbdb84
docs: land the player owner/friend selector plan from the previous se…
Jshewmaker Jul 7, 2026
4ba1533
feat: validate usernames on the trimmed value with 2-30 char bounds
Jshewmaker Jul 7, 2026
b320c2c
feat: add localized username validation and search failure copy
Jshewmaker Jul 7, 2026
4aa47c4
refactor: onboarding identity step collects only a username, trimmed …
Jshewmaker Jul 7, 2026
a6c447e
refactor: profile page drops name fields and gains inline username va…
Jshewmaker Jul 7, 2026
c16fb83
feat: drop firstName/lastName from the user profile model and localiz…
Jshewmaker Jul 7, 2026
aa5bff1
feat: stop collecting the provider display name; identity is username…
Jshewmaker Jul 7, 2026
8778527
fix: friend search failures show localized copy instead of raw except…
Jshewmaker Jul 7, 2026
159f68f
update
Jshewmaker Jul 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .claude/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"version": "0.0.1",
"configurations": [
{
"name": "web-development",
"runtimeExecutable": "flutter",
"runtimeArgs": [
"run",
"-d",
"chrome",
"--web-port",
"5959",
"--target",
"lib/main_development.dart"
],
"port": 5959
},
{
"name": "design-preview",
"runtimeExecutable": "flutter",
"runtimeArgs": [
"run",
"-d",
"chrome",
"--web-port",
"5960",
"--target",
"lib/main_design_preview.dart"
],
"port": 5960
}
]
}
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "magic-yeti"
}
}
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,48 @@ flutter gen-l10n --arb-dir="lib/l10n/arb"

Alternatively, run `flutter run` and code generation will take place automatically.

---

## Firebase Backend 🔥

Magic Yeti's backend lives alongside the Flutter app in this repo:

- `functions/` — TypeScript Cloud Functions (e.g. `validatePin`, a callable that
checks a user's PIN server-side against their salted private credentials).
- `firestore.rules` — Firestore security rules governing direct client reads
and writes (friends, requests, profiles, private credentials, etc.).

### Running backend tests

```sh
# Build and unit test the Cloud Functions
cd functions && npm run build && npm test && cd ..

# Run the firebase_database_repository package tests
cd packages/firebase_database_repository && flutter test && cd ..

# Run Firestore security rules tests against the emulator
firebase emulators:exec --only firestore "npm --prefix functions run test:rules"
```

If the globally-installed `firebase` CLI has trouble with `emulators:exec`, pin
a known-good version instead:

```sh
npx firebase-tools@14.9.0 emulators:exec --only firestore "npm --prefix functions run test:rules"
```

### Deploying

```sh
firebase deploy --only firestore:rules,functions
```

Deploys are run manually by a maintainer — see
`docs/superpowers/plans/2026-07-03-friends-INDEX.md` for the pre-deploy gate
(diffing versioned rules against the console's current production rules
before the first deploy).

[coverage_badge]: coverage_badge.svg
[flutter_localizations_link]: https://api.flutter.dev/flutter/flutter_localizations/flutter_localizations-library.html
[internationalization_link]: https://flutter.dev/docs/development/accessibility-and-localization/internationalization
Expand Down
Loading
Loading