Skip to content

Commit b063036

Browse files
author
Lalit Sharma
committed
docs: update documentation plans with wearable companion requirements and current implementation details
1 parent a7bc660 commit b063036

6 files changed

Lines changed: 73 additions & 44 deletions

File tree

documents/planning/01-documentation-plan.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Establish a maintainable documentation set that explains:
2222
- End-user behavior, states, and interaction model.
2323
- `documents/high-level/development-workflow.md`
2424
- Setup, scripts, monorepo workflow, and current engineering constraints.
25+
- `documents/high-level/wearable-companion-requirements.md`
26+
- Wearable companion behavior scope, acceptance criteria, and constraints.
2527

2628
### Low-Level Documentation
2729
- `documents/low-level/data-contracts.md`
@@ -30,6 +32,8 @@ Establish a maintainable documentation set that explains:
3032
- Computation stages, math helpers, root solving, and output derivation.
3133
- `documents/low-level/mobile-app-internals.md`
3234
- React Native state model, handlers, and UI-to-engine integration details.
35+
- `documents/low-level/wearable-companion-technical-design.md`
36+
- Phone/watch data-layer contracts, payload flow, and renderer behavior.
3337

3438
## Documentation Standards
3539

@@ -49,6 +53,5 @@ Update docs whenever any of these change:
4953

5054
## Open Gaps Identified
5155

52-
- Test strategy is not yet implemented (`test` scripts are placeholders).
53-
- Linting strategy is not yet implemented (`lint` scripts are placeholders).
56+
- Documentation command references can still drift from real root scripts (`dev:mobile`, `typecheck`, `lint`, `test`, `test:ci`, `coverage:gate`).
5457
- `deltaTSecondsApprox` exists but is not currently used by `computeCircumstances`.

documents/planning/in-app-alarm-rework-plan.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
11
# In-App Alarm Rework Plan (No Native Clock Export)
22

3-
Last updated: 2026-02-20
4-
Status: Proposed
3+
Last updated: 2026-02-27
4+
Status: Implemented in code; focused physical-device QA and final cleanup pending
55

66
## 1. Goal
77

88
Use a hybrid model:
99
- background local notifications for eclipse-level reminders (`T-1h`, `T-10m`)
1010
- foreground in-app alarms for fast, second-level event countdown guidance (`a1`, `a2`)
1111

12+
## 1.1 Current Implementation Snapshot (2026-02-27)
13+
14+
Implemented:
15+
1. `Notification Settings` rename to `Notification/Alarm Settings`.
16+
2. Persisted `a1`/`a2` settings with range checks and `a2 < a1` validation.
17+
3. Per-eclipse master toggle (`Enable alarms and reminders for this eclipse`) with per-event toggle preservation.
18+
4. Foreground in-app alarm engine (`a1` phrase, `a2` countdown, terminal event phrase).
19+
5. Fixed per-eclipse background reminders (`T-1h`, `T-10m`) anchored to first valid contact.
20+
6. Automated regression coverage for alarm timing, in-app engine behavior, and reminder scheduling.
21+
22+
Still pending:
23+
1. Full physical-device manual verification pass for the matrix in `## 10. Test Strategy`.
24+
2. Final notification-layer hardening called out in tracker items (for example private `expo-notifications/build/*` import cleanup).
25+
1226
## 2. Requested Behavior
1327

1428
1. Per-eclipse alarm enable/disable toggle.

documents/planning/photography-guide-plan.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Photography Guide Page Plan
22

3-
Last updated: 2026-02-26
3+
Last updated: 2026-02-27
44
Status: In progress (`Phase 1-3` complete, `Phase 4` partially complete)
55

66
## 1. Goal
@@ -45,7 +45,7 @@ Pending:
4545

4646
## 4. Distribution Rules
4747

48-
Given selected `n` in `{3,5,7,9,11}`:
48+
Given selected `n` in `{3,5,7,9}`:
4949

5050
1. `n` is odd and always includes one photo at `MAX`.
5151
2. Let `k = (n - 3) / 2`.

documents/planning/release-plan-eas.md

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
## Current Baseline
99

1010
- First public Android release is manual.
11-
- App version: `1.0.0`.
11+
- Current mobile version source is `apps/mobile/package.json` (currently `1.1.40`).
1212
- EAS project ID: `a29a7662-96be-4509-a79e-fbe4b5dac1ff`.
1313
- Build profile for stores: `production` in `apps/mobile/eas.json` (`autoIncrement: true`).
14-
- Runtime policy: `runtimeVersion` is tied to app version in `apps/mobile/app.json`.
14+
- Runtime policy: `version` and `runtimeVersion` are derived in `apps/mobile/app.config.ts` from `apps/mobile/package.json`.
1515
- GitHub workflow path for builds is self-hosted macOS (`.github/workflows/eas-build.yml`).
16+
- Store submit job runs automatically only when `apps/mobile/package.json` semver is greater than the latest `vX.Y.Z` tag.
1617

1718
---
1819

@@ -40,15 +41,15 @@
4041
- `GOOGLE_MAPS_ANDROID_API_KEY`: Google Cloud -> `APIs & Services -> Credentials -> API key` (restrict to Android app package/SHA-1 and Maps SDK for Android API).
4142
- `APPSTORE_ISSUER_ID` / `APPSTORE_API_KEY_ID` / `APPSTORE_API_PRIVATE_KEY`: App Store Connect -> `Users and Access -> Integrations -> App Store Connect API` (Team API key; paste full `.p8` contents for private key).
4243
- `GOOGLE_PLAY_SERVICE_ACCOUNT_JSON`: Play Console -> `Setup -> API access` (link GCP project/service account) + Google Cloud service account JSON key.
43-
- Detailed acquisition steps for every secret are documented in `documents/self-hosted-macos-runner.md` under `## 5. Repo secrets needed`.
44+
- Detailed acquisition steps for every secret are documented in `documents/planning/self-hosted-macos-runner.md` under `## 5. Repo secrets needed`.
4445
- GitHub Release publishing uses workflow `GITHUB_TOKEN` (`contents: write` permission configured in `.github/workflows/eas-build.yml`).
4546
- You do not create this token manually. GitHub injects it automatically for every workflow run.
4647
- In workflows it is available as `${{ secrets.GITHUB_TOKEN }}` (or `github.token` context).
4748
- If release creation fails with permission errors, check: `Settings -> Actions -> General -> Workflow permissions` and allow write access for the repository/organization policy.
4849
- Only use a PAT secret if org policy prevents write-capable `GITHUB_TOKEN`.
4950
- Store listing metadata is kept current in:
50-
- `documents/store-metadata.md`
51-
- `documents/store-privacy-declarations.md`
51+
- `documents/reference/store-metadata.md`
52+
- `documents/reference/store-privacy-declarations.md`
5253
- Required checks pass locally: `pnpm typecheck`, `pnpm lint`, `pnpm test`.
5354

5455
---
@@ -63,12 +64,11 @@
6364

6465
### 2) Versioning
6566

66-
- Bump `apps/mobile/package.json` -> `version` (for example: `1.0.1`).
67-
- Bump `apps/mobile/app.json` -> `expo.version` to the same value.
68-
- Bump `apps/mobile/app.json` -> `expo.runtimeVersion` to the same value.
69-
- Release workflow enforcement (`submit: true`):
67+
- Bump `apps/mobile/package.json` -> `version` (for example: `1.1.41`).
68+
- Do not set `expo.version` or `expo.runtimeVersion` in `apps/mobile/app.json`; both are derived from package version in `apps/mobile/app.config.ts`.
69+
- Release workflow enforcement (`submit` job):
7070
- Version must be valid `x.y.z`.
71-
- `package.json` version, `expo.version`, and `expo.runtimeVersion` must match.
71+
- `apps/mobile/app.json` must not define `expo.version` or `expo.runtimeVersion`.
7272
- New version must be greater than the latest Git tag in `vX.Y.Z` format.
7373
- Keep `android.versionCode` and `ios.buildNumber` managed by EAS `production.autoIncrement` unless a manual override is needed.
7474

@@ -85,24 +85,31 @@ pnpm test
8585
From repo root:
8686

8787
```bash
88-
pnpm -C apps/mobile exec eas build --profile production --platform ios --local
89-
pnpm -C apps/mobile exec eas build --profile production --platform android --local
88+
pnpm -C apps/mobile exec eas build --profile production --platform ios --local --non-interactive
89+
pnpm -C apps/mobile exec eas build --profile production --platform android --local --non-interactive
90+
pnpm -C apps/mobile exec eas build --profile production-apk --platform android --local --non-interactive
91+
pnpm -C apps/mobile exec eas build --profile production-wear --platform android --local --non-interactive
92+
pnpm -C apps/mobile exec eas build --profile production-wear-apk --platform android --local --non-interactive
9093
```
9194

9295
Android-only:
9396

9497
```bash
95-
pnpm -C apps/mobile exec eas build --profile production --platform android --local
98+
pnpm -C apps/mobile exec eas build --profile production --platform android --local --non-interactive
99+
pnpm -C apps/mobile exec eas build --profile production-apk --platform android --local --non-interactive
100+
pnpm -C apps/mobile exec eas build --profile production-wear --platform android --local --non-interactive
101+
pnpm -C apps/mobile exec eas build --profile production-wear-apk --platform android --local --non-interactive
96102
```
97103

98104
### 5) Submit binaries to stores
99105

100106
Option A: via GitHub Actions submit job (default)
101-
- Run `.github/workflows/eas-build.yml` with `submit: true` and `platform: ios|android|all`.
107+
- Push release commit to `main` (or run `workflow_dispatch`) after version bump.
102108
- The submit job uploads:
103109
- iOS `.ipa` to App Store Connect via `apple-actions/upload-testflight-build@v3`
104110
- Android `.aab` to Google Play via `r0adkll/upload-google-play@v1`
105-
- The same job also creates a GitHub Release `vX.Y.Z` and attaches generated artifacts (`ios.ipa`, `android.aab` for selected platform).
111+
- Wear OS `.aab` to Google Play internal track (non-blocking; pipeline continues if this upload fails)
112+
- The same job also creates a GitHub Release `vX.Y.Z` and attaches generated artifacts (`ios.ipa`, phone `android.aab` + `android.apk`, wear `wear.aab` + `wear.apk`).
106113

107114
Option B: manual direct upload from local machine
108115
- iOS: upload `.ipa` with Transporter or `xcrun altool`.
@@ -126,13 +133,13 @@ pnpm -C apps/mobile exec eas submit --platform android --path /absolute/path/to/
126133

127134
- Use `.github/workflows/eas-build.yml` for repeatable release execution.
128135
- Workflow runs on your self-hosted macOS runner.
129-
- Trigger `workflow_dispatch` with:
130-
- `platform: android` or `all`
131-
- `submit: true` when ready to upload automatically after build
136+
- Build job runs on every push to `main` and on `workflow_dispatch`.
137+
- Submit job runs automatically when release gate detects `apps/mobile/package.json` version > latest `vX.Y.Z` tag.
138+
- Use `workflow_dispatch` for dry-run validation; without a version bump, submit is skipped.
132139
- Keep required secrets configured:
133140
- `EXPO_TOKEN` for build
134141
- `APPSTORE_ISSUER_ID`, `APPSTORE_API_KEY_ID`, `APPSTORE_API_PRIVATE_KEY` for iOS upload
135-
- `GOOGLE_PLAY_SERVICE_ACCOUNT_JSON` for Android upload
142+
- `GOOGLE_PLAY_SERVICE_ACCOUNT_JSON` for Android + Wear uploads
136143
- Optional for EAS Submit fallback:
137144
- `EXPO_APPLE_ID` (iOS only)
138145

@@ -172,11 +179,11 @@ Rules:
172179
## Quick Checklist (Per Release)
173180

174181
- [ ] Changelog updated
175-
- [ ] Version updated (`app.json`, `package.json`)
182+
- [ ] Version updated (`apps/mobile/package.json`)
176183
- [ ] Typecheck/lint/test passed
177184
- [ ] Local build completed
178-
- [ ] Store upload completed (iOS + Android as applicable)
185+
- [ ] Store upload completed (iOS + Android, and Wear where applicable)
179186
- [ ] GitHub Release created with downloadable artifacts
180187
- [ ] Release notes entered in store consoles
181188
- [ ] Rollout started and monitored
182-
- [ ] Post-release verification done on physical Android + iOS devices
189+
- [ ] Post-release verification done on physical Android + iOS devices (and Wear device when applicable)

documents/planning/self-hosted-macos-runner.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Self-Hosted macOS Runner Setup (Mac mini)
22

3-
This project can build both iOS and Android on your own Mac mini using GitHub Actions self-hosted runners.
3+
This project can build iOS, Android (phone), and Android Wear artifacts on your own Mac mini using GitHub Actions self-hosted runners.
44
The updated workflows run on the label set:
55

66
- `self-hosted`
@@ -202,7 +202,7 @@ Notes:
202202

203203
1. `EXPO_TOKEN` is required for local `eas build --local` in CI.
204204
2. Store upload credentials are injected via GitHub secrets; no credential files need to live on the runner filesystem for pipeline submit.
205-
3. Keep `submit` job gated by the `production` environment approval in GitHub.
205+
3. Submit execution is gated by release version logic (`apps/mobile/package.json` semver must be greater than latest `vX.Y.Z` tag).
206206
4. GitHub Release creation uses `GITHUB_TOKEN` with `contents: write` permission (set in `.github/workflows/eas-build.yml`).
207207
- You do not add `GITHUB_TOKEN` as a repo secret; GitHub provides it automatically per workflow run.
208208
- It is available as `${{ secrets.GITHUB_TOKEN }}` (or `github.token` context).
@@ -215,15 +215,19 @@ Notes:
215215
- `.github/workflows/eas-build.yml`:
216216
- Runs CI checks on self-hosted macOS.
217217
- Builds locally with:
218-
- `eas build --local --platform ios`
219-
- `eas build --local --platform android`
220-
- Uploads local artifacts (`ios.ipa`, `android.aab`) to the workflow run.
221-
- Optional submit job uploads:
218+
- `eas build --profile production --platform ios --local`
219+
- `eas build --profile production --platform android --local`
220+
- `eas build --profile production-apk --platform android --local`
221+
- `eas build --profile production-wear --platform android --local`
222+
- `eas build --profile production-wear-apk --platform android --local`
223+
- Uploads local artifacts (`ios.ipa`, phone `android.aab` + `android.apk`, wear `wear.aab` + `wear.apk`) to the workflow run.
224+
- Conditional submit job uploads:
222225
- iOS via `apple-actions/upload-testflight-build@v3`
223226
- Android via `r0adkll/upload-google-play@v1`
227+
- Wear OS via `r0adkll/upload-google-play@v1` (non-blocking)
224228
- Submit job also:
225229
- Enforces release version bump (`apps/mobile/package.json` `version` must be greater than latest `vX.Y.Z` tag)
226-
- Creates a GitHub Release and attaches uploaded artifacts (`ios.ipa`/`android.aab`)
230+
- Creates a GitHub Release and attaches uploaded artifacts (`ios.ipa`, `android.aab`, `android.apk`, `wear.aab`, `wear.apk`)
227231

228232
Trigger conditions:
229233

@@ -309,16 +313,17 @@ If this passes, GitHub workflow `eas-build.yml` should pass on the same runner h
309313
## 8. First validation run
310314

311315
1. In GitHub Actions, run `Self-Hosted Mobile Build & Submit`.
312-
2. Inputs:
313-
- `platform: ios` first, then `android`.
314-
- `submit: false`.
315-
3. Confirm build artifacts are attached to the run.
316-
4. Then run once with `submit: true` after all four store-upload secrets are set:
316+
2. No manual inputs are required for `workflow_dispatch`; run it once as a build validation.
317+
3. Confirm build artifacts are attached to the run (`ios.ipa`, `android.aab`, `android.apk`, `wear.aab`, `wear.apk`).
318+
4. Ensure all four store-upload secrets are set:
317319
- `APPSTORE_ISSUER_ID`
318320
- `APPSTORE_API_KEY_ID`
319321
- `APPSTORE_API_PRIVATE_KEY`
320322
- `GOOGLE_PLAY_SERVICE_ACCOUNT_JSON`
321-
5. Verify a GitHub Release was created with attached mobile artifacts.
323+
5. Push a commit to `main` that bumps `apps/mobile/package.json` to a semver greater than the latest `vX.Y.Z` tag, then verify:
324+
- submit job runs,
325+
- store uploads execute,
326+
- a GitHub Release is created with attached mobile artifacts.
322327

323328
## 9. Common issues
324329

@@ -343,7 +348,7 @@ If this passes, GitHub workflow `eas-build.yml` should pass on the same runner h
343348
- Install JDK 17 on the runner (`brew install temurin@17`).
344349
- Or rely on workflow-managed Java setup (`actions/setup-java@v4`) and rerun.
345350
8. Submit job fails with missing secret:
346-
- Verify required secrets exist and are available to the selected environment (`production`).
351+
- Verify required secrets exist in repository Actions secrets and are readable by workflows.
347352
- For iOS, ensure `APPSTORE_API_PRIVATE_KEY` is the raw `.p8` key content, not a file path.
348353
9. Submit job fails on Google Play permissions:
349354
- Ensure the service account in `GOOGLE_PLAY_SERVICE_ACCOUNT_JSON` has access to app `com.lallimaven.eclipsetimer` and the target track.

documents/planning/tech-debt.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ These are not implemented yet and would add net-new capability.
8484
|---|---|---|---|---|
8585
| IMP-01 | High | Mobile module size concentration | Large files remain: `TimerScreen.tsx` (1523), `EclipsePreviewScreen.tsx` (884), `appState.tsx` (716), `RootNavigator.tsx` (623), `NotificationSettingsScreen.tsx` (582), `useTimerState.ts` (525) | Split by feature slices (compute adapter, map overlays, alarm controls, preview renderer, state reducers/selectors) |
8686
| IMP-02 | High | Notifications API usage | `apps/mobile/src/services/notifications.ts` imports from `expo-notifications/build/*` internals | Move to public `expo-notifications` exports to reduce SDK break risk |
87-
| IMP-03 | High | Native/app version consistency | `apps/mobile/android/app/build.gradle` hardcodes `versionCode 3`, `versionName "1.0.0"` while app package is `1.1.29` | Unify version source and remove conflicting hardcoded native values |
87+
| IMP-03 | High | Native/app version consistency | `apps/mobile/android/app/build.gradle` hardcodes `versionCode 3`, `versionName "1.0.0"` while app package is `1.1.40` | Unify version source and remove conflicting hardcoded native values |
8888
| IMP-04 | High | Observability configuration | Sentry values remain placeholders across app/native config (`App.tsx`, `app.json`, `android/sentry.properties`) | Move to env/secret-driven config with startup/build validation and docs |
8989

9090
### 3.2 Data contracts and engine correctness
@@ -122,7 +122,7 @@ These are not implemented yet and would add net-new capability.
122122
| ID | Priority | Area | Current state | Improvement |
123123
|---|---|---|---|---|
124124
| IMP-20 | High | Documentation command drift | Multiple docs still instruct non-existent root scripts (`pnpm dev`, `pnpm build`, `pnpm test:watch`, `pnpm clean`) and these commands fail when executed | Update docs to current script surface and add docs command validation check |
125-
| IMP-21 | Medium | Documentation path drift | Plain-text references still point to moved paths (for example root `README.md` references `documents/self-hosted-macos-runner.md`; release plan references old store docs paths) | Update stale paths to `documents/planning/*` and `documents/reference/*` |
125+
| IMP-21 | Medium | Documentation path drift | Plain-text references still point to moved paths (for example root `README.md` references `documents/self-hosted-macos-runner.md`) | Update stale paths to `documents/planning/*` and `documents/reference/*` |
126126
| IMP-22 | Medium | Duplicate config sources | Root `app.json`/`eas.json` and `apps/mobile` config diverge (including bundle ID/CLI profile details) | Define single source of truth and deprecate duplicates |
127127
| IMP-23 | Medium | Changelog source-of-truth drift | Both root `CHANGELOG.md` and `documents/reference/CHANGELOG.md` exist with divergent content/version history | Consolidate to one authoritative changelog location and update cross-links |
128128
| IMP-24 | Low | Environment/tooling enforcement | `packageManager` is pinned, but no strict `engines`/Corepack enforcement gate | Add `engines` and optional install-time guard script |

0 commit comments

Comments
 (0)