| new file mode 100644 |
| index 000000000..cd0e66b78 |
| --- /dev/null |
| +++ b/docs/superpowers/plans/2026-10-26-analytics-onramp-copy.md |
| @@ -0,0 +1,76 @@ |
| +# Analytics on-ramp: copy deck |
| + |
| +Every new or changed user-facing string of the analytics on-ramp plan |
| +(`2026-10-26-analytics-onramp.md`). The gate is |
| +`internal/console/approved_analytics_onramp_copy_test.go` |
| +(`TestAnalyticsOnrampCopyDeckIsApprovedAndApplied`). |
| + |
| +Status: pending the Luna pass. |
| + |
| +The rules (the same as the console navigation deck, |
| +`2026-10-25-console-ux-nav-copy.md`): |
| + |
| +- One table, columns `| id | where | old | new | checked by | status |`. A row |
| + is one line. |
| +- `where` is a path relative to `internal/console/`, then a short location |
| + note in parentheses. The gate searches the file named by the first token. |
| +- `new` is the approved text, used verbatim by the task that writes it. It is |
| + `(removed)` for a string that goes. |
| +- `checked by` is `gate` (a plain string the gate finds literally in the |
| + file, once the owning task lists its id in `onrampCopyBuilt`) or the name of |
| + the owning task's test, which the gate only checks exists. |
| +- `status` is `pending`, then `approved` or `removed`. No pending row may |
| + reach code or a template. |
| +- No em dashes in `new`. A full stop and a new sentence instead. |
| +- Human text only. Error fragments, diagnostics, JSON keys and URLs are not |
| + rows. |
| +- Placeholders: `<app>` an app's name, `<state>` the word on or off, |
| + `<count>` the word edge or off. `<a>` marks where a link starts and ends. |
| +- Strings that stay as they are are not rows: the Analytics tab's tables, |
| + chart and range toolbar, and the settings forms' own labels. |
| + |
| +What the strings are for: |
| + |
| +- The Analytics tab, when analytics is off for the app, stops pointing at |
| + Settings. It says what is counted and, for an owner, offers one button that |
| + turns analytics on for this app and comes back to the tab. A member sees a |
| + line saying an owner can turn it on. The empty tables and chart are hidden |
| + while it is off. |
| +- The Create an app form gets a checkbox, ticked when the account's default |
| + is on. Choosing differently from the account gives the new app its own |
| + setting. An owner also gets a button that makes the current choice the |
| + account default, which covers every app in the account without its own |
| + setting. A member sees the checkbox but cannot change it. |
| +- New accounts start with analytics on. Existing accounts are unchanged. |
| +- `carlos apps create` gains `--analytics` and `--no-analytics`. |
| + |
| +| id | where | old | new | checked by | status | |
| +|---|---|---|---|---|---| |
| +| AN-C01 | templates/app_analytics.html (analytics off, first sentence, bold) | Analytics is off for this app (from the account). | Analytics is off for this app. | gate | pending | |
| +| AN-C02 | templates/app_analytics.html (analytics off, what is counted) | When on, the edge counts HTML page views and daily visitors as it serves them: no JavaScript, no cookie, no stored IP. A visitor is a salted hash that changes every day. | When it is on, the edge counts HTML page views and daily visitors. No JavaScript, no cookie, no stored IP. | gate | pending | |
| +| AN-C03 | templates/app_analytics.html (analytics off, owner's button) | (new) | Turn on analytics | gate | pending | |
| +| AN-C04 | templates/app_analytics.html (analytics off, what a member sees instead of the button) | (new) | An owner of this account can turn it on. | gate | pending | |
| +| AN-C05 | templates/app_analytics.html (analytics off, the pointer to Settings; was NAV-C44) | Turn it on for this app in `<a>`Settings, under Errors and analytics`</a>`, or for the whole account in the account's `<a>`Settings`</a>`. | (removed) | TestAnalyticsTabOffStateOwner | pending | |
| +| AN-C06 | analyticsview.go (flash on the Analytics tab after Turn on analytics) | (new) | Analytics is on for this app. Page views show here as they are counted. | gate | pending | |
| +| AN-C10 | templates/app_new.html (checkbox label) | (new) | Count page views and visitors with analytics | gate | pending | |
| +| AN-C11 | templates/app_new.html (under the checkbox) | (new) | No JavaScript, no cookie, no stored IP. | gate | pending | |
| +| AN-C12 | templates/app_new.html (under the checkbox, the account's default is on) | (new) | This account's default is on. | gate | pending | |
| +| AN-C13 | templates/app_new.html (under the checkbox, the account's default is off) | (new) | This account's default is off. | gate | pending | |
| +| AN-C14 | templates/app_new.html (owner's button under the checkbox) | (new) | Make this the account default | gate | pending | |
| +| AN-C15 | templates/app_new.html (owner's note beside the button) | (new) | The account default also covers every existing app without its own setting. | gate | pending | |
| +| AN-C16 | templates/app_new.html (member's note; the checkbox is shown but cannot be changed) | (new) | Only an owner can change this. | gate | pending | |
| +| AN-C17 | server.go (flash: a member's form chose differently from the account default) | (new) | Only an owner can change analytics for a new app. Nothing was created. | gate | pending | |
| +| AN-C18 | server.go (flash: the app was created but its analytics setting failed to save) | (new) | Created app `<app>`, but its analytics setting could not be saved. Set it in Settings, under Errors and analytics. | TestNewAppAnalyticsWriteFailureSaysSo | pending | |
| +| AN-C19 | analyticsview.go (flash on the create form after Make this the account default, on) | (new) | Analytics is now on for every app in this account without its own setting. | gate | pending | |
| +| AN-C20 | analyticsview.go (flash on the create form after Make this the account default, off) | (new) | Analytics is now off for every app in this account without its own setting. | gate | pending | |
| +| AN-C21 | templates/account_settings.html (Analytics, last sentence of the help) | Whether that needs consent where your visitors are is your call, which is why it is off until you turn it on. | Whether that needs consent where your visitors are is your call. New accounts start with it on. | gate | pending | |
| +| AN-C22 | templates/app_settings.html (Errors and analytics, last sentence of the Analytics help) | Whether that needs consent where your visitors are is your call, which is why it is off until you turn it on. | Whether that needs consent where your visitors are is your call. New accounts start with it on. | gate | pending | |
| +| AN-C30 | ../../apps.go (`carlos apps create` flag help, `--analytics`) | (new) | turn analytics on for the new app (default: follow the account) | gate | pending | |
| +| AN-C31 | ../../apps.go (`carlos apps create` flag help, `--no-analytics`) | (new) | turn analytics off for the new app (default: follow the account) | gate | pending | |
| +| AN-C32 | ../../apps.go (`carlos apps create` output, the app has its own setting) | (new) | analytics: `<state>`, set for this app | TestAppsCreateAnalyticsLine | pending | |
| +| AN-C33 | ../../apps.go (`carlos apps create` output, the app follows the account) | (new) | analytics: `<state>`, following the account | TestAppsCreateAnalyticsLine | pending | |
| +| AN-C34 | ../../apps.go (`carlos apps create` error, the console did not confirm the choice) | (new) | the app `<app>` was created, but the console did not confirm its analytics setting. Set it with: carlos analytics --app `<app>` --set-count `<count>` | TestAppsCreateAnalyticsMismatch | pending | |
| +| AN-C35 | ../../apps.go (`carlos apps create` error, both flags given) | (new) | choose --analytics or --no-analytics, not both | gate | pending | |
| +| AN-C36 | apicli.go (`carlos apps create` refusal printed to a member) | (new) | only an owner can choose analytics for a new app. Leave out --analytics and --no-analytics to follow the account | gate | pending | |
| +| AN-C40 | ../../docs/site/cli.md (carlos analytics, first paragraph) | Off until you turn it on, for one app or for the whole account. | New accounts start with it on. Turn it on or off for one app or for the whole account. | gate | pending | |
| +| AN-C41 | ../../docs/site/cli.md (carlos apps, after the `--region` example) | (new) | `--analytics` or `--no-analytics` turns analytics on or off for the new app. Without either, the app follows the account's setting. Only an owner can choose differently from the account. | gate | pending | |