Documentation

Everything you need to get started with CC Break Monitor.

Overview

CC Break Monitor automatically tracks your active, break, and offline time on Command Center for AWS Support agents. It runs as a browser extension for Firefox and Chrome β€” no manual input required.

The extension monitors Command Center API calls in the background, categorises each status change, and shows a live panel with your daily totals, weekly goal, and progress toward your active time target. A day-level Deep Dive, a 4-week history, optional self-hosted cross-device sync, and CSV/JSON exports round out the picture.

Features at a Glance

⏱️ Auto-Detection πŸ“Š Time Tracking 🎯 Daily Target πŸ“… Weekly Goal & 4-Week History πŸ”¬ Deep Dive Day View 🍩 Donut / Bars Toggle πŸ–οΈ Leave Marker β†Ί Reset View ◐ Theme Toggle πŸ”„ Cross-Device Sync ⬆️ Force Push / Pull πŸ“₯ Export Reports πŸ“Œ Dock or Float πŸ”’ Privacy First πŸ” API-Key Security πŸ” Auto-Updates πŸ—‚οΈ Multi-Tab Support

See the full features page for detailed descriptions. A summary of each capability follows below.

Feature Reference

⏱️ Auto-Detection

The extension monitors Command Center API calls to detect status changes automatically β€” no manual input, no buttons to press. It intercepts PUT calls to the general status endpoint (watcher-iad.dre.kumo…/v1/agent/status) and the case-specific endpoint (global.api.gaderian…/agent/status), then reads the current status from the page's DOM badge and records the transition. A DOM-polling fallback (10-second interval) catches any change the request interceptor misses.

πŸ“Š Time Tracking

Every status change is logged with a timestamp and categorised into three buckets β€” Active (counts toward target), Break, and Offline. Time is tracked at second-level precision and displayed at minute precision (7h 46m). The status lists cover the full set of Command Center CCP aux states; unrecognised statuses default to Active, so new CC statuses work without an extension update. Past-day totals are reconciled from the raw transition stream and segments that span midnight are split across days, so time is never lost or double-counted.

🎯 Daily Target

Set a configurable daily active-time goal in Settings (default 7h 46m, region-adjustable). The panel shows a live countdown of remaining time, a real-time progress indicator, and a surplus summary once the target is met.

πŸ“… Weekly Goal & 4-Week History

A πŸ“… Week section in the panel and popup shows this week's total active hours, daily average, and remaining hours toward a configurable weekly target (default 38h 50m). The popup also displays the current week plus the previous three weeks β€” total hours and daily average each β€” for spotting trends. The work week is fully configurable: choose the week start day and work days per week (1–7, default 5), with a live preview of the computed range (e.g. Mon–Fri, Sun–Thu). Weekly bounds recalculate immediately when these settings change.

πŸ”¬ Deep Dive Day View

Click any day cell to open a day-level Deep Dive: an Active-vs-Break balance chart plus a scrollable Work/Break timeline of that day's status segments (start–end, category, duration). Each day cell also shows a slim in-cell Active/Break/Offline proportion bar, and the current day is highlighted.

🍩 Donut / Bars Toggle

The day breakdown renders as either a conic-gradient donut or a vertical bar chart (Active / Break / Offline). The choice persists for the session.

πŸ–οΈ Leave Marker (Working ⇄ Absent)

A two-state marker lets you flag a day as Working or Absent/Sick, with Save/Discard for unsaved changes. A day marked Absent is credited as a full working day at your Daily Target β€” it counts toward the weekly average and weekly target, so paid leave no longer drags the average down. The "Worked" column still shows real tracked active time. Expected days off can be hidden from the grid (default hidden).

β†Ί Reset View

The β†Ί button zeroes the displayed timers for a clean visual starting point mid-shift. This is view-only β€” it does not modify stored data, clears automatically on page reload, and your accumulated totals and exports remain intact.

◐ Theme Toggle

Click ◐ to cycle Dark, Light, and System (follows your OS via prefers-color-scheme). Themes use CSS custom properties and apply to the panel, toolbar popup, and options page. The panel and popup use a modern dashboard theme with summary cards ("Today's Productivity", "Week's Active Time", "Weekly Target" with a progress bar).

πŸ“Œ Docked & Floating Panel

The panel runs docked into the Command Center widget area, or floating as a movable overlay. In floating mode, drag the header handle to reposition it; the position persists across page reloads. The docked view scrolls horizontally in narrow layouts so nothing clips.

πŸ“₯ Export Reports

Two one-click exports from the panel header and toolbar popup:

Files land in your browser's Downloads folder; an optional subfolder is configurable in Settings.

πŸ”„ Cross-Device Sync

Sync is optional and self-hosted. Deploy a CloudFormation stack in your own AWS account to create a lightweight backend β€” HTTP API Gateway, a Lambda handler, two DynamoDB tables, and a least-privilege IAM role. On startup the extension pulls remote data and merges it with local state; on every status change it pushes an update; and a periodic push every 5 minutes catches anything missed. Conflict resolution takes the higher value for daily totals, deduplicates change logs by timestamp, and uses the latest timestamp for current status. Cost is effectively $0/month within the Free Tier, and data auto-expires after 90 days via DynamoDB TTL. See the landing page for the one-click deploy link.

⬆️ Force Push / Force Pull

Sync settings include manual controls for edge cases:

πŸ” API-Key Security

The sync backend authenticates every request (except /config) with an X-Api-Key header. Keys are SHA-256 hashed at rest and scoped per alias, so you can only read and write your own data. CORS is restricted to extension origins and the internal landing-page domain, the Chrome bridge uses a per-page-load nonce on its postMessage channel, both manifests declare an explicit Content Security Policy, and the API Gateway applies stage-level rate limiting. Generate and manage keys with the copyable command in the options page.

πŸ”’ Privacy First

All data is stored locally in browser.storage.local by default. No analytics, no telemetry, no third-party services. The Firefox manifest declares data_collection_permissions: required: ["none"], permissions are scoped to the specific CC and API domains, and cross-device sync is opt-in in your own AWS account. All source is readable and auditable. Distribution links resolve only from the internal AWS network.

πŸ” Auto-Updates

Firefox: signed via Mozilla AMO (unlisted) with an update_url pointing to updates.json on CloudFront; Firefox checks roughly every 24 hours and installs silently (force-check via about:addons β†’ gear β†’ "Check for Updates"). Chrome Web Store: auto-updates every few hours. Chrome Developer Mode: download the latest .zip and reload at chrome://extensions/.

πŸ—‚οΈ Multi-Tab Support

A single background script (Firefox) or service worker (Chrome) runs once regardless of how many Command Center tabs or windows are open. Each status change is recorded exactly once, all tabs receive the same data via message broadcasting, and no leader election or tab coordination is needed β€” the background process is the single source of truth.

Quick Start β€” Firefox

  1. Download the latest signed .xpi: cc_break_monitor-latest.xpi
  2. Firefox will prompt you to install β€” click Add.
  3. Open Command Center. The panel appears automatically.

Updates are automatic. Firefox checks roughly every 24 hours. Force-check via about:addons β†’ gear icon β†’ "Check for Updates".

Quick Start β€” Chrome

Option A β€” Chrome Web Store (when approved)

Install from the Web Store listing. Auto-updates are handled by Chrome.

Option B β€” Developer Mode (available now)

  1. Download the latest .zip: cc_break_monitor-chrome-latest.zip
  2. Unzip the file.
  3. Open chrome://extensions/ β†’ enable Developer mode (top-right toggle).
  4. Click Load unpacked β†’ select the unzipped folder.
  5. Open Command Center.

Project Structure

cc-break-monitor/ β”œβ”€β”€ FireFox-Extension/ β”‚ └── CC-StatusChange/ # Firefox (Manifest V2) β”‚ β”œβ”€β”€ background.js # Single background script β”‚ β”œβ”€β”€ content.js # Panel + DOM-poll fallback β”‚ β”œβ”€β”€ sync.js # Sync client β”‚ β”œβ”€β”€ popup.* / options.* β”‚ β”œβ”€β”€ build.sh # Firefox-only build + sign β”‚ β”œβ”€β”€ updates.json # Auto-update manifest β”‚ └── infra/ # CloudFront + S3 for auto-updates β”œβ”€β”€ Chrome-Extension/ β”‚ └── CC-StatusChange/ # Chrome (Manifest V3) β”‚ β”œβ”€β”€ background.js # Service worker β”‚ β”œβ”€β”€ interceptor.js # MAIN world β€” fetch/XHR intercept β”‚ β”œβ”€β”€ bridge.js # ISOLATED world β€” nonce-secured relay β”‚ β”œβ”€β”€ content.js / sync.js β”‚ └── popup.* / options.* β”œβ”€β”€ Sync-Backend/ β”‚ β”œβ”€β”€ cloudformation.yaml # One-click CloudFormation stack β”‚ β”œβ”€β”€ sync.js # Lambda handler β”‚ └── SETUP-SYNC.md β”œβ”€β”€ landing-page/ β”‚ β”œβ”€β”€ index.html # Download page (this site) β”‚ β”œβ”€β”€ readme.html / faq.html / features.html β”‚ β”œβ”€β”€ privacy-policy.html β”‚ └── logo.png + screenshots β”œβ”€β”€ docs/ β”‚ β”œβ”€β”€ ROLLBACK.md # Rollback procedures β”‚ └── SECURITY-ASSESSMENT.txt β”œβ”€β”€ build-all.sh # Unified build script β”œβ”€β”€ rollback.sh # Promote a past release to -latest β”œβ”€β”€ CHANGELOG.md β”œβ”€β”€ README.md β”œβ”€β”€ FAQ.md └── FEATURES.md

Settings Reference

The options page exposes:

Building & Publishing

./build-all.sh # Patch bump (1.4.0 β†’ 1.4.1) ./build-all.sh minor # Minor bump (1.4.0 β†’ 1.5.0) ./build-all.sh major # Major bump (1.4.0 β†’ 2.0.0) ./build-all.sh --no-upload # Build only, skip S3 upload ./build-all.sh --firefox-only ./build-all.sh --chrome-only ./build-all.sh --skip-git # Build without committing/tagging ./build-all.sh --skip-changelog-check # Skip the CHANGELOG entry requirement

What the script does

  1. Checks that CHANGELOG.md has an entry for the new version
  2. Bumps the version in both manifests
  3. Builds and signs the Firefox .xpi via Mozilla AMO (unlisted)
  4. Builds the Chrome .zip and publishes to the Web Store (if credentials are set)
  5. Updates the landing page with the new version
  6. Uploads artifacts to S3, including a permanent copy under releases/<version>/
  7. Invalidates the CloudFront cache
  8. Commits the bump, tags it vX.Y.Z, and pushes the commit + tag

Prerequisites

Rolling Back

Every build is archived under releases/<version>/ in S3, so you can promote a previous release back into the -latest slot without rebuilding:

./rollback.sh 1.4.5 # Promote v1.4.5 back into the -latest slot ./rollback.sh 1.4.5 --dry-run # Preview what would happen ./rollback.sh --list # List all archived releases

See docs/ROLLBACK.md for distribution vs code-level rollback procedures.

Version Scheme

Versions follow MAJOR.MINOR.PATCH with rollover: