Skip to content

Move to Grove 0.3.0-beta.18 with the Native Questionnaire - #166

Merged
PSchmiedmayer merged 7 commits into
mainfrom
grove-beta-migration
Dec 6, 2026
Merged

PSchmiedmayer merged 7 commits into
mainfrom
grove-beta-migration

Conversation

@PSchmiedmayer

Copy link
Copy Markdown
Member

♻️ Current situation & Problem

The app renders the symptom survey and the other study questionnaires with a ResearchKit-based renderer. Grove 0.3.0-beta.18 is the latest tagged beta and provides the account, onboarding, notification, Firestore, device and questionnaire modules the app needs, including a native SwiftUI questionnaire renderer.

The study already holds participant data, so the move must not change what is stored or how the backend reads it:

  • questionnaire responses keep the original canonical URLs, link IDs and answer codings, which the backend uses to compute symptom scores;
  • vital observations keep their standalone FHIR R4 shape, codings, UCUM units and device provenance;
  • a reminder message is only marked as processing once its response is stored.

No related issue was identified.

⚙️ Release Notes

  • The app pins Grove 0.3.0-beta.18 (exact version) and uses its products for account, onboarding, notifications, Firestore, devices, views and questionnaires.

  • Questionnaires render with GroveQuestionnaireUI. The study forms have no version, so StudyQuestionnaire builds their responses itself: it keeps the original canonical without a version, the original link IDs including nested groups, and the original valueCoding of each choice. Versioned forms use Grove's own conversion.

    let study = try StudyQuestionnaire(source, timeZone: timeZone)
    let response = try study.response(from: responses, locale: locale, calendar: calendar, timeZone: timeZone)
    // response.questionnaire == source.url (no version), link IDs and codings unchanged
  • ENGAGEHFStandard encodes each response with Firestore.Encoder, awaits the write, and only then marks the originating reminder as processing.

  • Vital measurements are stored through FirestoreVitalObservation.make(from:), which produces the same R4 Observation as before: LOINC and HealthKit codings with their displays, UCUM units, the blood pressure panel with systolic and diastolic components, effective time with the sample's time zone, and the source device and metadata extensions.

  • The device token is unregistered with the backend before logout and before account deletion.

  • NSCameraUsageDescription describes the camera use offered by the questionnaire's attachment questions. The other purpose strings were only needed for the previous renderer, and the Bluetooth purpose string is reworded to say what the app does with the connection.

  • CI checks out the Firebase submodule, which provides the questionnaire test fixtures, and gives the emulator a loopback web frontend URL so the Health Summary QR code works in UI tests.

📚 Documentation

Code comments describe the response conversion for unversioned study forms and the stored Observation shape.

✅ Testing

  • StudyQuestionnaireTests (new): imports all four published study questionnaires and checks the canonical URL, response identity, group and question link IDs and original codings; checks that a changed gating answer removes the dependent value; checks integer and text answers.
  • FirestoreVitalObservationTests (new): weight, heart rate and blood pressure documents, including codings and displays, units, identifiers, effective periods, provenance extensions and the round trip back to HealthKit samples; unsupported quantities are rejected.
  • SymptomSurveyUITests (new): schedules a survey reminder for the test participant in the emulator, completes the deployed KCCQ in the app, and reads the stored response back. It checks the canonical URL without a version, that every question's answer carries the questionnaire's own coding under the original link ID, and that the backend computes a symptom score from it.
  • OnboardingUITests, AccountTests and MessagesUITests updated for the Grove onboarding, sign-in and native questionnaire controls.
  • SymptomSurveyUITests joins the "Dashboard and Measurements" UI test shard; XCTest runs it after the tests there that expect a pending survey reminder.

Code of Conduct & Contributing Guidelines

By creating and submitting this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

Pin Grove 0.3.0-beta.18 and adopt its products and APIs across
account, onboarding, notifications, Firestore and devices.

Symptom surveys use GroveQuestionnaireUI and GroveQuestionnaireFHIR.
The study questionnaires keep their canonical URLs, link IDs, answer
codings and backend scoring. A response is written before its
reminder is marked as processing.

Vital observations keep their standalone FHIR R4 shape with device
provenance. The device token is unregistered before logout and
account deletion.

CI checks out the Firebase submodule for the questionnaire test
fixtures and gives the emulator a loopback web frontend URL.
@PSchmiedmayer
PSchmiedmayer added this pull request to stack #169 December 4, 2026 08:40
@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: aa3e376c-c40d-44c2-9d7c-9b8fdf86e3b8
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

The iOS 27.2 simulator runtime that the latest Xcode installs has no
iPhone 17 Pro, so the UI test build found no matching destination.
Periphery 3.8 reports state that is only used through its binding as
unused when it indexes a Swift 6.4 build, as the account sheet's
questionnaire and the account presentation are.
Static analysis checks out the app without the backend submodule, so
a bundled copy of the backend's questionnaires failed that build. The
questionnaire tests read the file from the checkout instead.
@PSchmiedmayer
PSchmiedmayer marked this pull request as ready for review December 4, 2026 19:56
The hosted macOS runners provide Xcode 26.6, where the CodeQL build of
the app stalled without output until the job was cancelled. The
self-hosted runners build every other job with the latest Xcode.
The processing states appear once the app has stored a measurement or
a survey response. On a busy emulator that took longer than the one
and five seconds the test allowed, while the states stay for a
minute.
@PSchmiedmayer
PSchmiedmayer merged commit 29cf66e into main Dec 6, 2026
18 checks passed
@PSchmiedmayer
PSchmiedmayer deleted the grove-beta-migration branch December 6, 2026 01:58
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.

1 participant