Skip to content

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

Merged
ibrahimroshdy merged 4 commits into
mainfrom
feat/counts-can-be-turned-off
Nov 13, 2026
Merged

ibrahimroshdy merged 4 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.

@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
@ibrahimroshdy
ibrahimroshdy force-pushed the feat/counts-can-be-turned-off branch from 4163634 to 2377dcb Compare November 13, 2026 00:11
ibrahimroshdy added a commit that referenced this pull request Nov 13, 2026
Review of #541 (#506):
- an export names a location's modules from its switch rows, and existing
  locations had none for Counts, so an import turned Counts off. 0177 now
  gives every location its Counts row, on; an export also names the modules
  it knew (modulesKnown), and an import sets only those, so one made before
  Counts leaves the target's own switch as it is;
- Check this kit shows only while Counts is on;
- with Counts off the Counts list (server, mock and app) lists the box checks
  only, with a line saying so, and a box check's Back lands on its
  location's list; a count's page says Counts are off instead of an error;
  /counts opens on a location with Counts on;
- a planned count with Counts off can be paused, resumed or deleted, but not
  done, snoozed or skipped (409 module_off; tool_unavailable through MCP and
  the assistant), and its row offers none of those;
- docs: Turning Counts off and the kits line in every language, and the es and
  it wording for planned counts.

Signed-off-by: Ibrahim Roshdy <22573766+ibrahimroshdy@users.noreply.github.com>
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>
One string for a location with Counts off, whose Counts list shows its box
checks only (#506).

Signed-off-by: Ibrahim Roshdy <22573766+ibrahimroshdy@users.noreply.github.com>
Review of #541 (#506):
- an export names a location's modules from its switch rows, and existing
  locations had none for Counts, so an import turned Counts off. 0177 now
  gives every location its Counts row, on; an export also names the modules
  it knew (modulesKnown), and an import sets only those, so one made before
  Counts leaves the target's own switch as it is;
- Check this kit shows only while Counts is on;
- with Counts off the Counts list (server, mock and app) lists the box checks
  only, with a line saying so, and a box check's Back lands on its
  location's list; a count's page says Counts are off instead of an error;
  /counts opens on a location with Counts on;
- a planned count with Counts off can be paused, resumed or deleted, but not
  done, snoozed or skipped (409 module_off; tool_unavailable through MCP and
  the assistant), and its row offers none of those;
- docs: Turning Counts off and the kits line in every language, and the es and
  it wording for planned counts.

Signed-off-by: Ibrahim Roshdy <22573766+ibrahimroshdy@users.noreply.github.com>
@ibrahimroshdy
ibrahimroshdy force-pushed the feat/counts-can-be-turned-off branch from 2377dcb to d5606aa Compare November 13, 2026 00:59
@ibrahimroshdy
ibrahimroshdy merged commit eb6aa69 into main Nov 13, 2026
21 checks passed
@ibrahimroshdy
ibrahimroshdy deleted the feat/counts-can-be-turned-off branch November 13, 2026 01:13
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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