Skip to content

feat: redesign countdown timer UI and migrate to TypeScript - #8

Merged
salmanfarisvp merged 5 commits into
mainfrom
feat/redesign-ui
Dec 3, 2026
Merged

salmanfarisvp merged 5 commits into
mainfrom
feat/redesign-ui

Conversation

@salmanfarisvp

@salmanfarisvp salmanfarisvp commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Summary

Redesigns the Countdown Timer to match the new look of the Clock and Simple Timer apps, and moves it onto the shared @screenly/edge-apps TypeScript stack.

1920x1080

UI

  • Dark canvas with a brand-accent glow at the top (light theme when the brand color is light), same as the Clock app
  • Headline as a tracked uppercase label; large Inter digits for days / hours / minutes / seconds, seconds in the accent color
  • Unit labels and dates are localized via Intl (e.g. "jours", "Stunden")
  • Thin progress bar from starting_timestamp to target_timestamp, with the start and target dates underneath (hidden if the start is not before the target)
  • When the countdown ends, countdown_end_text replaces the digits (replaces the old circular overlay)
  • 2×2 unit grid in portrait
  • Removed: "Powered by Screenly" brand logo card and the day/date card

Under the hood

  • TypeScript + Bun + edge-apps-scripts, same setup as Clock / Simple Timer
  • Drops moment.js and all vendored scripts/fonts in static/
  • Naive timestamps (YYYY-MM-DDTHH:MM:SS) are read as wall-clock time in the screen's timezone, now DST-correct; explicit offsets (Z, +02:00) are respected
  • Sentry via setupSentry, error handling via setupErrorHandling
  • screenly.yml settings migrated to schema_version: 1 help text with display order / advanced flags; added display_errors
  • Added checks.yml workflow, unit tests, screenshot spec and screenshots for all resolutions; README rewritten

Rebuild the app on @screenly/edge-apps with Bun/Vite, following the
visual language of the redesigned clock and simple-timer apps.

- Dark canvas with brand-accent radial wash and light-brand variant
- Large Inter digits with localized unit labels, accent seconds
- Start-to-target progress bar with localized dates
- End text replaces the digits when the countdown finishes
- 2x2 unit grid in portrait
- DST-correct parsing of naive timestamps in the screen's timezone
- Drop moment.js and vendored static scripts/fonts
- Settings migrated to schema_version 1 help text; add display_errors
- Unit tests, screenshot spec and generated screenshots
Copilot AI lite review requested due to automatic review settings November 20, 2026 21:08
@salmanfarisvp salmanfarisvp self-assigned this Nov 20, 2026
@salmanfarisvp salmanfarisvp added the enhancement New feature or request label Nov 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Active issues remain: the README image path will not render, and countdown parsing mishandles invalid calendar dates and DST spring-forward gaps.

3 open issues
What changed in this PR

Redesigns the Countdown Timer UI and migrates the app from legacy JavaScript and vendored assets to the shared TypeScript/Bun Edge Apps stack.

Changes:

  • Replaces the card-based layout with a responsive countdown display, progress bar, localized labels, and finished state.
  • Adds timezone-aware timestamp parsing, countdown state logic, unit tests, and screenshot coverage.
  • Updates project tooling, deployment configuration, documentation, and CI workflows.
File Description
tsconfig.json Adds the shared TypeScript configuration.
static/​js/​tz.min.js Removes the legacy timezone lookup bundle.
static/​js/​main.js Removes the legacy JavaScript application entry point.
static/​img/​Screenly.svg Removes the obsolete Screenly logo asset.
static/​img/​clock-icon.svg Removes the obsolete clock icon asset.
static/​css/​styles.css Removes legacy countdown styling.
static/​css/​common.css Removes legacy shared layout and typography styles.
src/​main.ts Initializes the new countdown UI and shared Edge Apps services.
src/​css/​style.css Defines the redesigned responsive countdown presentation.
src/​countdown.ts Implements timestamp parsing, countdown calculations, progress, and localization.
src/​countdown.test.ts Adds unit tests for countdown and timestamp behavior.
screenly.yml Migrates settings to schema version 1 metadata and adds new configuration options.
README.md Rewrites setup, deployment, configuration, testing, and screenshot documentation.
package.json Adds Bun, TypeScript, build, test, lint, and deployment scripts.
index.html Replaces the legacy markup with the new semantic countdown structure.
e2e/​screenshots.spec.ts Adds screenshot coverage across supported resolutions.
.ignore Ignores installed Node dependencies.
.gitignore Adds build, log, generated asset, and screenshot exclusions.
.github/​workflows/​checks.yml Adds the shared Edge Apps checks workflow.

Review effort: Lite

Comment thread src/countdown.ts Resolved
Comment thread src/countdown.ts Resolved
Comment thread README.md Resolved
- Reject out-of-range dates/times (e.g. 2028-02-31) instead of letting
  Date.UTC roll them over
- Resolve wall-clock times with Temporal 'compatible' disambiguation:
  spring-forward gaps move forward, fall-back overlaps take the earlier
  instant
- Use a repository-relative README screenshot path
Copilot AI lite review requested due to automatic review settings November 20, 2026 21:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

An active moderate issue allows documented explicit-offset timestamps with invalid calendar fields to be silently normalized by Date, so invalid countdown settings are not reliably rejected.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Validate date and time components in offset-bearing timestamps

src/​countdown.ts:98

The component validation only runs when NAIVE_TIMESTAMP matches. An explicit-offset value (which the README documents as supported) takes this branch and is delegated to Date, which normalizes out-of-range fields: 2028-02-31T00:00:00Z becomes 2028-03-02T00:00:00.000Z instead of being rejected. Apply the same calendar/time-component validation to offset-bearing ISO timestamps before accepting them, so invalid target or start settings cannot silently move the countdown.

3 resolved since last review

Review effort: Lite

Parse explicit-offset ISO timestamps (Z, ±HH:MM, ±HHMM) with the same
component validation as naive ones instead of delegating to Date, which
normalizes out-of-range fields. Non-ISO strings are now rejected.
@salmanfarisvp

Copy link
Copy Markdown
Member Author

Addressed Copilot's Validate date and time components in offset-bearing timestamps in ebb9179: parseTimestamp now parses Z / ±HH:MM / ±HHMM timestamps itself and applies the same component validation as naive ones (so 2028-02-31T00:00:00Z, 25:00, +24:00 and +05:60 are rejected) instead of falling back to Date. Non-ISO strings are rejected too. Tests added.

Copilot AI lite review requested due to automatic review settings November 20, 2026 21:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A moderate active finding shows fractional-second timestamps are silently truncated, causing countdowns to finish early and contradicting documented and tested behavior.

1 open issue

Review effort: Lite

Comment thread src/countdown.ts Resolved
Copilot AI lite review requested due to automatic review settings November 20, 2026 21:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human assessment is needed because an invalid target_timestamp can be treated as successful startup while showing a misleading zero countdown, leaving configuration failure unclear to users.

No open issues 🎉

1 resolved since last review

Review effort: Lite

Replace the misleading zeroed countdown and empty progress/date footer
with a clear message when the target setting cannot be parsed.
Copilot AI lite review requested due to automatic review settings November 20, 2026 21:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human assessment is needed because date validation mishandles ISO years from 0000 through 0099, creating a moderate edge-case correctness issue.

No open issues 🎉

Review effort: Lite

@salmanfarisvp
salmanfarisvp requested a review from 514sid November 21, 2026 08:48
@salmanfarisvp
salmanfarisvp merged commit 88afacc into main Dec 3, 2026
2 checks passed
@salmanfarisvp
salmanfarisvp deleted the feat/redesign-ui branch December 3, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants