Skip to content

feat(counts): a location can turn Counts off - #541

Open
ibrahimroshdy wants to merge 2 commits into
mainfrom
feat/counts-can-be-turned-off
Open

ibrahimroshdy wants to merge 2 commits into
mainfrom
feat/counts-can-be-turned-off

Conversation

@ibrahimroshdy

Copy link
Copy Markdown
Collaborator

Counts can be turned off for a location, like Labels and Lending.

Closes #506.

  • counts joins the modules and is on in every preset, so existing locations are unchanged.
  • Migration 0177 (additive, CREATE OR REPLACE only): kept.module_enabled() knows counts, and the agenda leaves planned counts out while Counts is off, so they stop reminding.
  • Server, Counts off: the Counts list, a count's result, CSV and lines, and the open-count lookup answer 404 module_off; starting a count or creating or editing a planned count answers 409; the phone's count sync operations are dropped. Packs, moves and box checks are unaffected.
  • Web, Counts off: Count here, Count regularly and Past counts leave the place page; Count this box leaves the box menu (Box check stays); Count this room leaves the map card; the location's Counts link goes; Tools → Counts hides once Counts is off everywhere; a link straight to a count shows "Counts are off".
  • MCP has no count tools; upcoming reads the agenda, so it follows.

Decisions in this PR

  • Box check stays with Counts off: the issue doesn't list it, and the docs treat it as part of moving things.
  • Count schedules still show on the Schedules page while Counts is off; they leave the agenda and can't be created or edited.

Definition of done

  • Tests: sessions/counts-module.test.ts (4) and screens/counts-module.test.tsx (6), three cases in session-screen.test.tsx, modules.test.ts, locations.test.ts, tours.test.ts, each seen failing first. Server suite green apart from the Mailpit tests that need a local Mailpit. Fast gate green.
  • Docs: modules and presets, Counts and stocktakes ("Turning Counts off"), the features page and README, in every language.
  • Catalogues: two new strings in every catalogue.
  • KEPT_* settings: n/a.
  • Security-relevant: no (a module gate, as the others).
  • Roadmap: Counts: a way to turn them off #506 on 1.14.8.

Two strings for a place with Counts turned off everywhere (#506): the Counts
list and Start a session say so, and who can turn them back on.

Signed-off-by: Ibrahim Roshdy <22573766+ibrahimroshdy@users.noreply.github.com>
Counts is now a module, like Labels and Lending, for a location that doesn't
count. It is in every preset, so every location keeps its counts until an
owner or admin turns it off in What to track; nothing is deleted.

Off in a location:
- the place page has no Count here, Count regularly or Past counts; boxes no
  Count this box; the map's room card no Count this room; Start a session no
  count there; the location page no Counts link; Tools hides Counts once it
  is off everywhere, and the Counts list says so;
- the counts' reads are 404 module_off and writes 409 (the list, a count's
  page, its CSV, its lines, the open-count lookup, starting a count); a
  count saved on a phone meanwhile is dropped; a planned count can't be made
  or changed, and leaves the agenda, so it reminds no one;
- packs, moves and box checks are unchanged.

Migration 0177 is additive: kept.module_enabled() gains counts in every
preset and the agenda view filters planned counts by it.

Docs: Modules and presets, Counts and stocktakes, features, README.

Fixes #506

Signed-off-by: Ibrahim Roshdy <22573766+ibrahimroshdy@users.noreply.github.com>
@ibrahimroshdy
ibrahimroshdy requested a review from a team as a code owner November 12, 2026 18:32
@ibrahimroshdy ibrahimroshdy added this to the 1.14.8 milestone Nov 12, 2026
@ibrahimroshdy ibrahimroshdy added the area: web The app's screens (apps/web) label Nov 12, 2026

This branch has not been deployed

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

Labels

area: web The app's screens (apps/web)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Counts: a way to turn them off

1 participant