Skip to content

[Bug] Unable to log historical cycle dates #1004

Description

@sreeramachandramurthy

HealthLog version

v1.38.24

Deployment type

Self-hosted (Docker)

What happened?

I am manually trying to add historical cycle (January 26th, 2026 which is before current day)

  1. healthlog incorrectly assumes I am logging Day 2
Image
  1. I proceed and click on Save and healthlog discards the action
Image

Expected behavior

healthlog should save the Cycle as a historical date or show an error message "Cannot log historical dates"

Steps to reproduce

  1. Login into healthlog (as a Female user)
  2. Navigate to Cycles
  3. In the Calendar tab, navigate and click on an previous date (January 26th in this screenshot)
  4. Popup incorrectly suggests Day 2. Ignore the message.
  5. Click on Save. Popup closes but date is not saved.

Relevant logs / screenshots

No error logs. Below log is captured after reopening the date and clicking on the save button again.


{
  "timestamp": "2026-09-18T16:56:08.632Z",
  "request_id": "dc3bdf59-7635-4ee2-9f10-34dc2c139358",
  "trace_id": "64eae9a5-8516-4b01-b04d-57b1f840e63c",
  "kind": "http",
  "service": "healthlog",
  "environment": "production",
  "deploy": {
    "node_version": "v22.23.1",
    "hostname": "<redacted>"
  },
  "level": "info",
  "http": {
    "method": "POST",
    "path": "/api/cycle/day-logs",
    "route": "/api/cycle/day-logs",
    "status": 201,
    "user_agent": "Mozilla/5.0 (X11; Linux x86_64; rv:155.0) Gecko/20100101 Firefox/155.0",
    "ip": "<redacted>"
  },
  "auth": {
    "user_id": "<redacted>",
    "user_role": "USER",
    "auth_method": "session",
    "record_context": {
      "epoch": 0,
      "scope": null
    },
    "provider_work_authority": {
      "origin": "owner",
      "recordUserId": "<redacted>",
      "actorUserId": "<redacted>",
      "grantId": null
    }
  },
  "action": {
    "name": "cycle.day-log.upsert",
    "entity_type": "cycle_day_log",
    "entity_id": "cmu77a13i007v01o7r0bijhus"
  },
  "meta": {
    "existed": false,
    "source": "MANUAL"
  },
  "duration_ms": 114,
  "runtime": {
    "loop_max_ms": 0.6,
    "loop_last_ms": 0.3
  }
}

Browser / OS (if applicable)

Mozilla Firefox 155.0.1 (64-bit) on Ubuntu 24.04

Pre-flight checks

  • I confirmed this is not a duplicate of an existing issue.
  • I redacted any secrets, tokens, or personal data from logs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions