Skip to content

feat: turn features on in Settings, starting with Goals - #101

Merged
AmrMsCLL merged 1 commit into
mainfrom
feat/goals
Oct 11, 2026
Merged

AmrMsCLL merged 1 commit into
mainfrom
feat/goals

Conversation

@AmrMsCLL

Copy link
Copy Markdown
Member

First of five opt-in features (plan: .claude/.Plans/as2026-10-11-strata-situational-features.md, migration approved by Amr).

Turning features on

  • Settings gets a Features tab that lists the opt-in features with a toggle each. They are all off by default.
  • A feature you turn on appears in the sidebar under a "Features" heading, in the phone's More menu and in search. Turning it off hides it and keeps the data.
  • The choice is per person (users.features, validated against users/features.ts) and travels in the session, so the sidebar needs no extra request.
  • Opening the page of a feature that is off leads to Settings → Features with "Turn on Goals to open it."

Goals

  • A goal belongs to a space and covers a year, a quarter or a month. You pick the period from real choices ("Q4 2026"), and the server stores the period's first and last day.
  • Progress comes from a number to reach ("120 of 500 km") or, without one, from linked tasks that are done. Tasks link through the existing item links.
  • A goal can follow habits from its space (new goal_habits table), and their streaks show on the goal.
  • The Goals page groups active goals by period with a progress meter, and a filter shows done or dropped ones. The goal page shows progress, tasks (link, create, tick off, unlink) and habits, and a menu marks it done, drops it or moves it to the trash.
  • Reuses TaskRow (which gains an optional actions slot), TaskEditor, HabitRow, Page, Section, Toolbar and FormDialog, plus Meter and the target icon from graphite-ui 0.4.3.

Schema (migration 20261013000000_features_and_goals, additive only, as approved)

  • users.features (text array, empty default).
  • Item kind goal.
  • Tables goals and goal_habits.

Dependency: @project-graphite/ui 0.4.2 → 0.4.3 (our own package; Project-Graphite/graphite-ui#16, which adds Meter and icons).

Tests

  • New: server/test/integration/goals.spec.ts (feature switch, periods, both kinds of progress, habits, access, trash) and frontend/test/goals.spec.tsx (hidden until turned on, list and create, link, tick, unlink, mark done).
  • Also ran the habits and tasks integration specs; the auth, account, app-module and validation unit specs; and the settings, search, routes, tasks, habits and dashboard frontend specs. tsc -b, oxlint and the build pass.
  • Checked in the local stack: turning Goals on, adding a quarter goal and a number goal, and adding a task from the goal page.

@github-actions github-actions Bot added the size/xl Over 600 changed lines, excluding lockfiles label Oct 11, 2026
@AmrMsCLL
AmrMsCLL merged commit c569dae into main Oct 11, 2026
7 checks passed
@AmrMsCLL
AmrMsCLL deleted the feat/goals branch October 11, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xl Over 600 changed lines, excluding lockfiles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant