diff --git a/.fvmrc b/.fvmrc new file mode 100644 index 00000000..084b2bc5 --- /dev/null +++ b/.fvmrc @@ -0,0 +1,3 @@ +{ + "flutter": "3.41.9" +} diff --git a/.github/ISSUE_TEMPLATE/bugfix.yml b/.github/ISSUE_TEMPLATE/bugfix.yml index 26e68f3e..f66c348f 100644 --- a/.github/ISSUE_TEMPLATE/bugfix.yml +++ b/.github/ISSUE_TEMPLATE/bugfix.yml @@ -9,8 +9,8 @@ body: attributes: value: | # Bug Report Form - Thank you for taking the time to report a bug. Please provide as much detail as possible to help us investigate and resolve the issue quickly. - + Thank you for taking the time to report a bug. **The more information you provide, the faster the issue will be resolved** — fill in every field you can, even the optional ones. + **Note:** Fields marked with an asterisk (*) are required. - type: input @@ -19,8 +19,6 @@ body: label: App Version description: Which version of the app are you currently using? placeholder: "e.g. 1.5" - validations: - required: true - type: dropdown id: platform @@ -31,21 +29,10 @@ body: options: - iOS - Android - - Web - - Desktop - Both iOS and Android validations: required: true - - type: input - id: device-model - attributes: - label: Device Model - description: What is the specific device model you're using? - placeholder: "e.g., iPhone 12 Pro, Samsung Galaxy S21" - validations: - required: true - - type: input id: os-version attributes: @@ -55,16 +42,12 @@ body: validations: required: true - - type: dropdown - id: deployment-mode + - type: input + id: affected-screen attributes: - label: App Deployment Mode - description: How was the app deployed to your device? - options: - - Production (App Store/Play Store) - - TestFlight/Beta - - Development (Local) - - Other (specify in additional info) + label: Affected Screen / Feature + description: Where in the app did the bug happen? Be specific — name the screen, tab, or feature. + placeholder: "e.g., Study consent screen, Heart rate task, Settings → Account" validations: required: true @@ -81,15 +64,29 @@ body: id: reproduction-steps attributes: label: Steps to Reproduce - description: How can we reproduce this issue? Be specific and detailed. + description: | + How can we reproduce this issue? Be specific — every step a fresh install needs to hit the same bug. + Include the exact account / study / invitation code used, whether you were logged in, and any toggles or permissions that were on/off. value: | - 1. Go to '...' - 2. Click on '...' - 3. Scroll down to '...' + 1. Start from '...' (fresh install? logged in? which study/invitation?) + 2. Go to '...' + 3. Tap on '...' 4. Observe the error validations: required: true + - type: textarea + id: configuration + attributes: + label: Study / Protocol Configuration + description: | + If the bug depends on a specific study, deployment, sampling package, or device configuration, describe (or paste) it here. Include the deployment ID / invitation code if applicable. + placeholder: | + - Study: ... + - Deployment ID / invitation code: ... + - Sampling packages enabled: ... + - Paired external devices (Polar, Movesense, etc.): ... + - type: textarea id: expected-behavior attributes: @@ -118,6 +115,16 @@ body: [Paste your logs here] The text will be automatically formatted into code. + - type: textarea + id: flutter-doctor + attributes: + label: Flutter Doctor Output + description: | + Developer reporters only — paste the output of `fvm flutter doctor -v` (or `flutter doctor -v` if not using FVM). Skip this section if you're reporting as an end user. + render: shell + placeholder: | + [Paste `fvm flutter doctor -v` output here] + - type: textarea id: screenshots attributes: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..7abc8ae1 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,49 @@ +# Contributing + +Thanks for contributing to the CARP study app. This guide covers how to propose changes; it does not cover local environment setup (see the README for that). + +## Branching + +- `master` — released code; tagged versions are cut from here. +- `test` — staging branch. `develop` is promoted here for QA / pre-release validation before it reaches `master`. Do not open feature PRs against `test`. +- `develop` — integration branch. **Open all PRs against `develop`.** +- Feature branches — named `feature/`, `fix/`, or `chore/`. + +Flow: `feature/*` → `develop` → `test` (staging) → `master` (release). + +## Flutter version + +This repo pins the Flutter SDK with [FVM](https://fvm.app/). The version is declared in `.fvmrc` and **must** be used for development and CI so builds are reproducible. Run Flutter commands as `fvm flutter ...`. + +## Commit messages + +- Use the imperative mood ("add X", "fix Y", not "added X"). +- Keep the subject under 72 characters. +- Reference an issue in the body when relevant (`Refs #123`, `Closes #123`). + +## Pull requests + +Before opening a PR: + +1. Rebase on the latest `develop`. +2. Run `fvm flutter analyze` and `fvm dart format .` — both must be clean. +3. Run `fvm flutter test` — the suite is minimal today, but keep it green and add tests for new model logic where practical. +4. Build and smoke-test the change in at least the `local` and `dev` deployment modes (see `launch.json`). Note in the PR description which modes you tested. + +When opening the PR: + +- **Title** — short and descriptive, prefixed with the change type: `feat:`, `fix:`, `chore:`, `docs:`, `refactor:`. Example: `fix: handle null study id during consent`. +- **Description** — what changed and *why*. Link the issue it resolves. Call out any user-visible behavior change, migration concern, or risk to other deployment modes. +- **Scope** — one logical change per PR. Split unrelated fixes into separate PRs. +- **Screenshots / recordings** — required for any UI change. +- **Reviewers** — request at least one reviewer from the core team. + +## Code style + +- Dart formatter line length: 120 (configured in `analysis_options.yaml`). +- Follow the lints in `analysis_options.yaml`; do not suppress warnings without a comment explaining why. +- Prefer small, focused widgets and pure functions; avoid adding state to a widget when a parent already owns it. + +## Reporting issues + +Bugs and improvement suggestions go through the GitHub issue templates in `.github/ISSUE_TEMPLATE/`. Do not file security issues in public issues — see `SECURITY.md` if present, or email the maintainers directly.