Skip to content

Implement aligned trend findings and editable tags#217

Merged
Sturmi77 merged 3 commits into
mainfrom
cursor/findings-implementation-9d88
May 30, 2026
Merged

Implement aligned trend findings and editable tags#217
Sturmi77 merged 3 commits into
mainfrom
cursor/findings-implementation-9d88

Conversation

@Sturmi77
Copy link
Copy Markdown
Owner

@Sturmi77 Sturmi77 commented May 30, 2026

Summary

  • Align trend lines and comparison heatmap rows on a shared daily axis, including daily year-range timeseries buckets.
  • Add persistent symptom/tag layer toggles in Trends and a toggleable symptom context section in Insights.
  • Allow custom tags to be created inline from the entry tag picker and selected immediately.
  • Update frontend/product/architecture docs to describe the shipped descriptive symptom context, shared daily axis, and inline tag creation.

Documentation

  • docs/FRONTEND.md: entry TagPicker create flow, Insights symptom toggle, Trends shared daily axis/layer persistence, component map.
  • docs/frontend/SYMPTOM_VISUALIZATION.md: status changed to partially implemented, implemented subset and acceptance criteria updated.
  • docs/features/symptom-analytics.md: implementation note for the frontend-only descriptive slice.
  • docs/ARCHITECTURE.md and docs/DESIGN_DOCUMENT.md: clarify shipped UI context vs. pending inferential analytics.

Testing

  • pnpm --dir apps/web test -- src/lib/utils/charts.test.ts src/lib/components/trends/MetricTimeseries.test.ts src/lib/components/insights/InsightFeed.test.ts src/lib/components/entries/TagPicker.test.ts
  • pnpm --dir apps/web lint
  • backend/.venv/bin/python -m pytest tests/test_stats_service.py --no-cov
  • backend/.venv/bin/python -m ruff check app/services/stats_service.py tests/test_stats_service.py
  • Docs-only follow-up: pnpm --dir apps/web exec prettier --write ../../docs/FRONTEND.md ../../docs/frontend/SYMPTOM_VISUALIZATION.md ../../docs/features/symptom-analytics.md ../../docs/ARCHITECTURE.md ../../docs/DESIGN_DOCUMENT.md and git diff --check

Note: backend/.venv/bin/python -m pytest tests/test_stats_service.py passes the selected tests but exits non-zero because the repository-wide coverage gate is enforced on a single-file run.

Open in Web Open in Cursor 

@Sturmi77 Sturmi77 marked this pull request as ready for review May 30, 2026 10:31
@Sturmi77 Sturmi77 merged commit def837a into main May 30, 2026
14 checks passed
@Sturmi77 Sturmi77 deleted the cursor/findings-implementation-9d88 branch May 30, 2026 10:31
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Risk assessment: Medium-High. Code review is required, so I am not approving this PR.

Evidence from the diff: the PR changes multiple production user-facing analytics surfaces (trends, insights, editable entry tags), adds shared chart-axis behavior, and changes backend yearly timeseries output from monthly buckets to 365 daily points. That creates meaningful UI regression and payload/performance risk, but no auth, schema migration, deployment, or security-boundary change.

Reviewer assignment: I did not request reviewers because the changed-file history and repository collaborator list only show the PR author plus automation/bot accounts, and there is no CODEOWNERS file. Please request an eligible human reviewer with frontend analytics and backend stats context.

Open in Web View Automation 

Sent by Cursor Automation: Assign PR reviewers

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b9d4cb33d0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +37 to +45
$: axisStart =
tagHeatmap?.start_date ?? symptomHeatmap?.start_date ?? points[0]?.period_start ?? '';
$: axisEnd =
tagHeatmap?.end_date ??
symptomHeatmap?.end_date ??
points[points.length - 1]?.period_end ??
points[points.length - 1]?.period_start ??
'';
$: axisDates = axisStart && axisEnd ? buildIsoDateRange(axisStart, axisEnd) : [];
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Align timeseries to the same local date window

When the browser's local date differs from UTC (for example, US evening after 00:00 UTC), the heatmap window comes from dateWindow() using localIsoDate(new Date()), while fetchTimeseries(range) still uses the backend's UTC _today(). Because this new shared axis prefers tagHeatmap.start_date/end_date and buildDailyAxisLinePoints only plots points whose dates are on that axis, the latest UTC timeseries point is dropped and the first local heatmap day has no line point. Please derive both requests from the same as-of/end date, or make the axis include the union of the returned timeseries and heatmap dates.

Useful? React with 👍 / 👎.

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.

2 participants