Skip to content

feat(tracking-page): settings screen for the customer tracking page - #357

Merged
roncodes merged 5 commits into
release/v0.6.72from
feature/tracking-page-settings-ui
Oct 7, 2026
Merged

roncodes merged 5 commits into
release/v0.6.72from
feature/tracking-page-settings-ui

Conversation

@roncodes

@roncodes roncodes commented Oct 6, 2026

Copy link
Copy Markdown
Member

PR 4 of the customer tracking pages refactor. It adds the settings screen at FleetOps → Settings → Tracking Page, plus an admin panel for the generic page's instance defaults.

Depends on #355 (the settings endpoints). This branch contains #355's commit, so until that merges this diff also shows the server change. I didn't stack the PRs, because merging a stacked PR's base closes it.

The screen

  • Pages:
    • your own tracking page on or off;
    • its address under /t/, with a live availability check (debounced call to validate-slug) and copy and open links;
    • opting out of the shared page;
    • which page emails and labels link to.
  • Branding:
    • display name, falling back to the organization name;
    • accent colour with a live contrast ratio (the text colour on it is derived automatically) and an optional dark-mode accent;
    • support phone, email and website;
    • "Powered by Fleetbase";
    • follow the device or always light;
    • default and enabled languages.
  • Access:
    • status without verification;
    • SMS and email codes. SMS is disabled, with the reason shown, when the instance has no SMS provider;
    • how long a device stays verified;
    • customer sign-in and the account suggestion, shown only when the Customer Portal is installed.
  • What verified customers see: toggles for each item, plus the privacy rules that always apply.
  • Live preview: light and dark, themed from utils/tracking-page-theme. The tracking page itself (PR 5) will use the same tokens.

Settings load in the route's model() hook, not in a controller constructor.

Admin

A new "Tracking Page" panel under Fleet-Ops Config sets the generic page's instance defaults: on or off, display name, accent, support contacts and powered-by.

Also

  • A sidebar item and a settings-hub card.
  • tracking-page.settings.* translation keys in all 10 locales. Non-English files carry the English text until they're translated.

Not in this PR

…page

Add the settings backend for the customer tracking page refactor (PR 2):

- TrackingPageConfig: the company config's shape, defaults and sanitizing
  (pages, branding, access, what verified visitors see), instance defaults
  for the generic page, slug rules with a reserved list, and accent contrast
  helpers (ink colour and WCAG ratio).
- SettingController: get/save tracking-page-settings, a live slug check, and
  admin defaults. Saved slugs are indexed in fleet-ops.tracking-page-slugs.*
  so the public page resolves a company in one read; an enabled organization
  page refuses an invalid, reserved or taken slug. The read-back includes the
  slug status, the accent's ink and contrast, whether SMS is configured
  (Twilio counts only with credentials), and whether the customer portal is
  installed.
- Routes under settings/, and a tracking-page-settings permission resource.
PR 4 of the tracking pages refactor: FleetOps -> Settings -> Tracking Page.

- Pages: own page on/off, its address under /t/ with a live availability
  check, copy and open links, shared-page opt-out, and which page emails and
  labels link to.
- Branding: display name, accent with a live contrast check (the text colour
  on it is derived), an optional dark-mode accent, support contacts,
  Powered by Fleetbase, light/dark behaviour, default and enabled languages.
- Access: status without verification, SMS and email codes (SMS disabled with
  a reason when the instance has no SMS provider), session length, and
  customer sign-in and account upsell when the customer portal is installed.
- What verified customers see, with the privacy rules that always apply.
- A live light and dark preview themed from the same tokens the page will
  use (utils/tracking-page-theme).
- Admin panel 'Tracking Page' under Fleet-Ops Config for the generic page's
  instance defaults; sidebar item, settings hub card, and translation keys
  in all 10 locales (English text until translated).

Settings load in the route's model hook, not a controller constructor.
filter_var(null, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE) returns
false, not null, so every unset toggle (generic page allowed, powered by, the
visibility defaults) came out false instead of its default.
@codecov

codecov Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (9ba5d0d) to head (4ef4dd8).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##                main      #357    +/-   ##
============================================
  Coverage     100.00%   100.00%            
- Complexity     12379     12452    +73     
============================================
  Files            600       601     +1     
  Lines          46496     46696   +200     
============================================
+ Hits           46496     46696   +200     
Flag Coverage Δ
backend 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@roncodes
roncodes changed the base branch from main to release/v0.6.72 October 7, 2026 05:59
@roncodes roncodes mentioned this pull request Oct 7, 2026
@roncodes
roncodes merged commit 7d65a14 into release/v0.6.72 Oct 7, 2026
11 checks passed
@roncodes
roncodes deleted the feature/tracking-page-settings-ui branch October 7, 2026 06:07
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.

1 participant