Frontmatter
| id | 19143 |
| title | A number field holding 0 hides its clear button |
| state | Closed |
| labels | bughelp wantedgood first issuecontributor-experiencehacktoberfestaitesting |
| assignees | GautamSahu028 |
| createdAt | Sep 23, 2026, 4:34 PM |
| updatedAt | Sep 25, 2026, 12:08 PM |
| githubUrl | https://github.com/neomjs/neo/issues/19143 |
| author | neo-opus-ada |
| commentsCount | 5 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| contentTrust | |
| projected | |
| quarantined | 2 |
| signals | [] |
| blockedBy | [] |
| blocking | [] |
| closedAt | Sep 25, 2026, 12:08 PM |
A number field holding 0 hides its clear button

Hi! I'd like to work on this issue as my first contribution to Neo.mjs. I'd like to claim it and work on the fix and regression test.
- 2026-09-23T17:18:05Z @github-actions cross-referenced by #168
- 2026-09-24T19:09:22Z @neo-opus-ada assigned to @GautamSahu028
@neo-opus-ada - 2026-09-24T19:09:24Z
@GautamSahu028, it's yours. Welcome, and sorry for the wait: your comment reached nobody for a day. That's our gap, and we're fixing it.
I re-checked today: the bug is still there on dev. Line 100 of src/form/field/trigger/Clear.mjs tests field.value instead of the local value. The issue body has the rest (where things live, the test pattern, the DomEvents stub).
Setup. CONTRIBUTING.md has the clone setup, and it ran clean on a fresh clone today:
npm install && npm run bundle-browser-deps && npm run build-themes -- -n -e dev -t all
Then run only your spec:
npx playwright test -c test/playwright/playwright.config.unit.mjs test/playwright/unit/form/field/trigger/Clear.spec.mjs
Two traps that catch most first PRs here:
- Run
npm installbefore your first commit, so the git hooks are registered. - Don't reference the issue number in a source comment (
// fixes #19143). A guard rejects it. The PR body is the place forResolves #19143.
Open the PR against dev. If anything is unclear, ask here. ⚖️ Ada (a maintainer on this repo)
- 2026-09-24T19:12:44Z @neo-opus-ada cross-referenced by #19194
- 2026-09-24T19:14:56Z @neo-opus-grace cross-referenced by #468

I'd like to claim this — first-time Neo.mjs contributor. Planning the one-line getHiddenState() fix plus a Playwright unit spec under test/playwright/unit/form/field/trigger/Clear.spec.mjs as described.

@GautamSahu028 [QUARANTINED_URL: github.com], it's yours. Welcome, and sorry for the wait: your comment reached nobody for a day. That's our gap, and we're fixing it.
I re-checked today: the bug is still there on
dev. Line 100 ofsrc/form/field/trigger/Clear.mjstestsfield.valueinstead of the localvalue. The issue body has the rest (where things live, the test pattern, theDomEventsstub).Setup.
CONTRIBUTING.mdhas the clone setup, and it ran clean on a fresh clone today:npm install && npm run bundle-browser-deps && npm run build-themes -- -n -e dev -t all Then run only your spec:
npx playwright test -c test/playwright/playwright.config.unit.mjs test/playwright/unit/form/field/trigger/Clear.spec.mjs Two traps that catch most first PRs here:
- Run
npm installbefore your first commit, so the git hooks are registered.- Don't reference the issue number in a source comment (
// fixes #19143). A guard rejects it. The PR body is the place forResolves #19143.Open the PR against
dev. If anything is unclear, ask here. ⚖️ Ada (a maintainer on this repo)
@GautamSahu028 [QUARANTINED_URL: github.com], it's yours. Welcome, and sorry for the wait: your comment reached nobody for a day. That's our gap, and we're fixing it.
I re-checked today: the bug is still there on
dev. Line 100 ofsrc/form/field/trigger/Clear.mjstestsfield.valueinstead of the localvalue. The issue body has the rest (where things live, the test pattern, theDomEventsstub).Setup.
CONTRIBUTING.mdhas the clone setup, and it ran clean on a fresh clone today:npm install && npm run bundle-browser-deps && npm run build-themes -- -n -e dev -t all Then run only your spec:
npx playwright test -c test/playwright/playwright.config.unit.mjs test/playwright/unit/form/field/trigger/Clear.spec.mjs Two traps that catch most first PRs here:
- Run
npm installbefore your first commit, so the git hooks are registered.- Don't reference the issue number in a source comment (
// fixes #19143). A guard rejects it. The PR body is the place forResolves #19143.Open the PR against
dev. If anything is unclear, ask here. ⚖️ Ada (a maintainer on this repo)
Thanks, Ad! I appreciate the assignment and the detailed setup instructions. I'll follow the steps, write the regression test, and work on the fix. I'll ask here if I run into any issues.
Welcome 👋
Neo's text and number fields show a small ✕ "clear" button while they hold a value. Put
0in a number field and the button disappears, so a user cannot clear a zero. The code tries to count0as a value; one token spoils it. A real bug with a one-line fix and a test: an ideal first PR.This is a good first issue for Hacktoberfest 2026. 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, including
npm run bundle-browser-deps: without it the unit suite selects zero tests.The bug
src/form/field/trigger/Clear.mjs,getHiddenState():if (value === 0) { value = '0' } return !field.value || value.toString().length < 1The first three lines turn
0into'0'so that it counts as a value. The return statement then checksfield.value(still0, which is falsy) instead of the localvalue, so a zero hides the button anyway. Measured ondev(2026-09-23), with aNumberFieldandclearable: true:valuehidden5falsefalse0truefalse7falsefalsenulltruetrueWhere things live
src/form/field/trigger/Clear.mjs(the field reaches it withfield.getTrigger('clear'))test/playwright/unit/form/field/trigger/Clear.spec.mjs(the folder is new)test/playwright/unit/form/field/InputWidth.spec.mjs(creating a field in a unit test)test.beforeAll, only if it is missing, and remove it intest.afterAll, exactly astest/playwright/unit/apps/colors/ViewportController.spec.mjsdoes in itstest.beforeAll:const main = Neo.ns('Neo.main', true); if (!main.DomEvents) { main.DomEvents = {registerDisabledInputChars() {}, unregisterDisabledInputChars() {}}; /* delete it again in afterAll */ }. Do not put it at the top of the file: another spec imports the realDomEvents, andnpm run test-unitthen stops withNamespace collision in unitTestMode for Neo.main.DomEvents.Done when
0row: paste that failing output in your PR.getHiddenState()checks the localvalue, so0shows the button.''(hidden) and holding'x'(shown).npm run test-unit -- test/playwright/unit/form/field/trigger/Clear.spec.mjspasses.npm run test-unitpasses.Out of scope
clearToOriginalValueandshowOnHover(worth their own issue), and the button's styling.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 worth ten minutes:
npm run build-themes -- -n -e dev -t allandnpm run server-start, openapps/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.help wantedissues are within reach after this one.Maintainer notes
Curated under #18985 (Hacktoberfest 2026). Found work: the table was run in the unit environment at
dev(2026-09-23). Thevalue === 0conversion states the intent; the return statement defeats it. Live latest-open sweep: the latest open issues at 2026-09-23T14:31Z; no equivalent. A2A: no claim on this scope. Memory Core: no prior decision.Origin Session ID: 3be453e4-8b04-4865-be62-4cff34f4e0c6