[!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: a layout is geometry, and #18985's tier rule sends what a person looks at to a real browser.
Welcome 👋
A Neo container arranges its children with a layout: fit makes one child fill the container, while hbox and vbox line children up. The fit layout is the simplest. It adds neo-layout-fit to the container and neo-layout-fit-item to each child, and its CSS makes that child fill the box. This spec mounts a real container in a browser and measures that the child actually fills it. A clean first spec with room to teach.
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/layout/Fit.mjs, which adds the classes (containerCls, applyChildAttributes, removeChildAttributes). resources/scss/src/layout/Fit.scss makes the container a stretching flexbox and gives the item flex: 1 0 100%.
- New test file:
test/playwright/component/layout/Fit.spec.mjs. It sits beside Cube.spec.mjs, the layout spec that asserts from what renders rather than from what it wrote.
- Pattern to copy:
test/playwright/component/component/Image.spec.mjs. It mounts into the empty test viewport with Neo.worker.App.createNeoInstance, reads the real DOM, and destroys afterwards. For the container, pass importPath: '../container/Base.mjs', ntype: 'container', layout: {ntype: 'fit'}, a fixed style (e.g. 300px × 200px) and its items. To change a config on the mounted container, use Neo.worker.App.setConfigs({id, ...}), as test/playwright/component/component/Base.spec.mjs does.
What to cover
| Setup |
Expected in the browser |
a 300 × 200 container with layout: 'fit' and one child |
the container has neo-layout-fit, the child has neo-layout-fit-item, and the child's rendered box is 300 × 200 |
the child also carries its own cls: ['x'] |
it keeps x beside neo-layout-fit-item |
a second child with ignoreLayout: true |
it does not get neo-layout-fit-item |
the container switched to layout: {ntype: 'vbox'} |
the child loses neo-layout-fit-item, and the container loses neo-layout-fit |
Done when
Out of scope
The other layouts, which deserve their own issues, and theming.
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 spec named this layout on dev (2026-09-23). The class behaviour was run against Neo.create(Fit) in the unit environment then: ["x","neo-layout-fit-item"] after two applies, ["x"] after a remove, and ignoreLayout untouched.
Live latest-open sweep: the latest 20 open issues at 2026-09-23T14:24Z, with no equivalent (the layout.Fit title search returns one closed issue). A2A: no claim on this scope. Memory Core: no prior decision.
Revised 2026-11-06, after @neo-gpt-emmy's readiness note. The reservation is released, since it ended 2026-10-31. The tier now matches the banner: the unit rows could only read back the class the method had just written, which is the tier rule's "too low" tell, so the spec now measures the rendered box. The old "rendering a real container" exclusion is gone, because rendering one is now the point. The fill expectation follows from Fit.scss (stretching flexbox, flex: 1 0 100%).
Origin Session ID: 3be453e4-8b04-4865-be62-4cff34f4e0c6
Welcome 👋
A Neo container arranges its children with a layout:
fitmakes one child fill the container, whilehboxandvboxline children up. The fit layout is the simplest. It addsneo-layout-fitto the container andneo-layout-fit-itemto each child, and its CSS makes that child fill the box. This spec mounts a real container in a browser and measures that the child actually fills it. A clean first spec with room to teach.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
src/layout/Fit.mjs, which adds the classes (containerCls,applyChildAttributes,removeChildAttributes).resources/scss/src/layout/Fit.scssmakes the container a stretching flexbox and gives the itemflex: 1 0 100%.test/playwright/component/layout/Fit.spec.mjs. It sits besideCube.spec.mjs, the layout spec that asserts from what renders rather than from what it wrote.test/playwright/component/component/Image.spec.mjs. It mounts into the empty test viewport withNeo.worker.App.createNeoInstance, reads the real DOM, and destroys afterwards. For the container, passimportPath: '../container/Base.mjs',ntype: 'container',layout: {ntype: 'fit'}, a fixedstyle(e.g.300px × 200px) and itsitems. To change a config on the mounted container, useNeo.worker.App.setConfigs({id, ...}), astest/playwright/component/component/Base.spec.mjsdoes.What to cover
layout: 'fit'and one childneo-layout-fit, the child hasneo-layout-fit-item, and the child's rendered box is 300 × 200cls: ['x']xbesideneo-layout-fit-itemignoreLayout: trueneo-layout-fit-itemlayout: {ntype: 'vbox'}neo-layout-fit-item, and the container losesneo-layout-fitDone when
test/playwright/component/layout/Fit.spec.mjsexists and follows the pattern file's setup and teardown.test(...)per table row.src/.npm run test-components -- test/playwright/component/layout/Fit.spec.mjspasses.npm run test-componentspasses.Out of scope
The other layouts, which deserve their own issues, and theming.
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:
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.neo-agent-skills, and they need no Knowledge Base and no Memory Core. With Claude or GPT beside you, thehelp wantedissues are within reach after this one.Maintainer notes
Curated under #18985 (Hacktoberfest 2026). Found work: no spec named this layout on
dev(2026-09-23). The class behaviour was run againstNeo.create(Fit)in the unit environment then:["x","neo-layout-fit-item"]after two applies,["x"]after a remove, andignoreLayoutuntouched.Live latest-open sweep: the latest 20 open issues at 2026-09-23T14:24Z, with no equivalent (the
layout.Fittitle search returns one closed issue). A2A: no claim on this scope. Memory Core: no prior decision.Revised 2026-11-06, after @neo-gpt-emmy's readiness note. The reservation is released, since it ended 2026-10-31. The tier now matches the banner: the unit rows could only read back the class the method had just written, which is the tier rule's "too low" tell, so the spec now measures the rendered box. The old "rendering a real container" exclusion is gone, because rendering one is now the point. The fill expectation follows from
Fit.scss(stretching flexbox,flex: 1 0 100%).Origin Session ID: 3be453e4-8b04-4865-be62-4cff34f4e0c6