Skip to content

[Bug] iOS exposes two inconsistent medication logging dead ends when no active medications exist #647

Description

@lutzkind

Summary

When an account has no active medications, the iOS app exposes two different medication-logging entry points that both lead to dead ends, use inconsistent terminology, and do not offer the only useful next action: adding a medication.

Affected client

  • HealthLog iOS/TestFlight
  • Observed with HealthLog-iOS 0.17.0
  • Self-hosted server connected and otherwise healthy

Reproduction

Use an account with no active medications.

Path 1: Log a dose

  1. Open the general Log flow.
  2. Choose the medication/dose option.
  3. The app opens a sheet titled Log a dose.

Actual result:

  • The screen says No active medications to log against.
  • The sheet is mostly empty.
  • Both a back button and a Cancel button are shown.
  • The primary Log button is disabled.
  • There is no Add medication action.

Path 2: Log an intake

  1. Open the medication intake flow from the medication-related surface.
  2. The app opens a sheet titled Log an intake.

Actual result:

  • The screen says No pending intake.
  • It adds Nothing scheduled is due right now. Head back and check in later.
  • Log manually appears disabled.
  • There is no Add medication action.

Why this is inconsistent

The server model legitimately distinguishes:

  • an active medication that can receive a manual intake; and
  • a scheduled intake that is currently due.

However, when the account has no active medications at all, the second screen's message is misleading: nothing will become due by checking again later. Both screens become dead ends, while using dose and intake for nearly identical user intent.

Expected behavior

The empty state should depend on account state:

  1. No active medications

    • Show one clear empty state: No active medications.
    • Offer Add medication as the primary action.
    • Use one close/cancel affordance, not both back and cancel.
  2. Active medications exist, but none is due

    • Show No dose due right now.
    • Keep Log manually enabled so the user can select an active medication.
  3. A scheduled intake is due

    • Show the due-intake action flow.
  4. Manual logging opened directly

    • Show the active-medication selector immediately.

Terminology should be consistent across both paths, or the distinction between a scheduled intake and a manually logged dose should be made explicit.

Suggested implementation

  • Resolve active-medication count before choosing the empty state.
  • Route the no-active-medication state to a shared component with an Add medication deep link.
  • Reserve No pending intake for accounts that actually have active scheduled medications but no currently due slot.
  • Keep manual logging available whenever at least one active medication exists, regardless of whether a slot is due.
  • Remove duplicate dismissal controls from the empty form.

Regression tests

  • No active medications → Add medication is shown; no misleading check in later copy.
  • Active as-needed medication, nothing scheduled → manual logging is available.
  • Active scheduled medication, none due → manual logging remains available.
  • Scheduled medication due → pending-intake flow is shown.
  • Empty manual form uses a single dismissal affordance.

Evidence

Screenshots from the same account state show the two inconsistent empty flows:

  • Log a doseNo active medications to log against.
  • Log an intakeNo pending intake / check in later, with disabled Log manually.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions