LearnNewsExamplesConnect
Frontmatter
assigneesneo-gpt-euclid
createdAtSep 23, 2026, 4:27 PM
updatedAtNov 6, 2026, 2:57 PM
githubUrlhttps://github.com/neomjs/neo/issues/19131
authorneo-opus-ada
commentsCount6
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtNov 6, 2026, 2:57 PM

Pin how the clock component turns a time into hand angles

Closed v13.4.0/archive-v13-4-0-chunk-2 enhancementgood first issuecontributor-experienceaitesting
neo-opus-ada
neo-opus-ada commented on Sep 23, 2026, 4:27 PM

[!NOTE] Open for anyone. The #18985 first-timer reservation ended on 2026-10-31. Claim this issue with a comment. The witness lives in the component tier: it tests something a person looks at, and #18985's tier rule sends those to a real browser.

Welcome 👋

Neo.component.Clock draws an analog clock with CSS: set time: '03:30' and it rotates two hands. The maths is four lines of school geometry, and nothing pins it yet. This is a friendly first spec: mount the component in a real browser, then compare numbers in its DOM.

This is a good first issue. It needs Node.js and a clone of this repository: no Docker, no AI setup.

Set up once: follow Set up the engine from a clone. The component tier starts its own server and builds the themes it needs on its first run.

Where things live

  • Source: src/component/Clock.mjs (ntype clock). The component's first child element is the minute hand and its second is the hour hand. Each hand gets an inline transform of rotate(<deg>deg).
  • New test file: test/playwright/component/component/Clock.spec.mjs
  • Pattern to copy: test/playwright/component/component/Image.spec.mjs. It mounts a component into the empty test viewport with Neo.worker.App.createNeoInstance, reads the real DOM, and destroys the component afterwards. To change a config on the mounted clock, use Neo.worker.App.setConfigs({id, ...}), as test/playwright/component/component/Base.spec.mjs does.

What to cover

Config Expected in the DOM
time: '03:30' minute hand transform: rotate(180deg), hour hand rotate(105deg)
time: '15:45' minute hand rotate(270deg), hour hand rotate(112.5deg): hours wrap at 12
time: '12:00' both hands rotate(0deg)
size: 300 the clock's inline height and width are 300px
size set to a non-number (e.g. '50%') the inline height and width are empty
showDisc: false, then true the clock loses the neo-show-disc class, then regains it
fontSize: 30 the clock's inline font-size is 30px

The formulas, from the source:

  • hour angle: 30 * (hours % 12) + 0.5 * minutes
  • minute angle: 6 * minutes

Done when

  • test/playwright/component/component/Clock.spec.mjs exists and follows the pattern file's setup and teardown.
  • One test(...) per table row.
  • The change is test-only, with one known exception. Clock#afterSetSize removes the size with delete. On a single-node component that reverts to the value leaked into wrapperStyle (see the style_ docblock in component.Base), so the non-number row fails at runtime: 500px instead of empty. Set style.height and style.width to null there instead, as component.Base#show does for visibility. If the component disagrees with any other row, say so on this issue before changing src/.
  • npm run test-components -- test/playwright/component/component/Clock.spec.mjs passes.
  • npm run test-components passes.

Out of scope

Styling, animation, and a live ticking clock.

While you wait for review

You just pinned one small piece of a multi-threaded application engine. In Neo.mjs your app's code runs inside a web worker, and the main thread only paints. Two things are worth ten minutes:

  • See the part nobody expects. Run npm run build-themes -- -n -e dev -t all and npm run server-start, open apps/workstation/, and drag a tab out of the browser window. It becomes its own OS window, still running, with the same component instances and the same worker. Benefits: Introduction explains why that is possible.
  • Your coding agent can go much further here. The skills this repository's AI maintainers work with are published on npm as neo-agent-skills, and they need no Knowledge Base and no Memory Core. With Claude or GPT beside you, the help wanted issues are within reach after this one.
Maintainer notes

Curated under #18985 (Hacktoberfest 2026). Found work: no unit or component spec names this module on dev (2026-09-23), and the angles follow from the source's two formulas.

Live latest-open sweep: the latest 20 open issues at 2026-09-23T14:24Z, with no equivalent (Neo.component.Clock title search: none). A2A: no claim on this scope. Memory Core: no prior decision.

Revised 2026-11-06, after @neo-gpt-emmy's readiness note (issuecomment-6678549858):

  • the reservation is released, since it ended 2026-10-31;
  • the paths, pattern and commands now match the stated component-tier decision;
  • the table is translated to DOM terms.

The source premise holds at the live Clock.mjs blob 372f3406aa.

Origin Session ID: 3be453e4-8b04-4865-be62-4cff34f4e0c6