{ "name": "inspector-window", "description": "Exercises model-declared secondary windows (windows_fn + window_view): a task list whose inspector opens in a real second OS window, live-updates with the selection, and reflects a user close back into the model.", "prompt": "This workspace is a freshly scaffolded Native SDK native-frontend app (see README.md; the view is src/app.native, the logic src/main.zig). Replace the counter with a small task list app that has a detachable inspector window.\n\nRequirements:\n- The main window shows a list of at least four seeded tasks, each with a name and a one-line detail. Two of the seeds must be exactly: name \"Draft release notes\" with detail \"Due Friday\", and name \"Fix flaky test\" with detail \"CI is red\". Exactly one task is selected at a time (pressing a row selects it and it becomes visually distinct); the selection starts on \"Draft release notes\".\n- A button labeled exactly \"Open Inspector\". Pressing it opens a SECOND OS window titled exactly \"Inspector\" — a real separate window owned by the app, not a dialog, sheet, or overlay drawn inside the main window. The inspector shows the selected task's name and its detail line.\n- No duplicate windows, ever: while the inspector is open, pressing \"Open Inspector\" again must do nothing (or the button is disabled).\n- The inspector live-updates: with the inspector open, selecting a different task in the main window immediately changes what the inspector shows.\n- Closing the inspector with its window close button must be reflected in the app's state: re-opening works and shows the current selection.\n- A status bar in the main window with the exact text \"Inspector: open\" or \"Inspector: closed\" (starting closed), updating live.\n- Keep the model and all update logic in src/main.zig; author the main window's view in markup (src/app.native).\n- Validate the markup with `native markup check src/app.native`, and keep `zig build test` green — extend src/tests.zig so the tests cover: opening the inspector through the real dispatch path (assert the app now declares the second window), the no-duplicate rule, a user close resetting the state, and the inspector reflecting a selection change.\n\nWhen you are done, make sure `zig build test` passes and summarize what you built.", "frontend": "native", "timeoutMs": 1500000, "maxTurns": 100, "checks": [ { "type": "build_test", "args": [ "-Dplatform=null" ] }, { "type": "markup_check" }, { "type": "file_grep", "files": "src/main.zig", "pattern": "windows_fn\\s*=", "expect": true, "description": "the inspector is model-declared through Options.windows_fn" }, { "type": "file_grep", "files": "src/main.zig", "pattern": "window_view\\s*=", "expect": true, "description": "the inspector's content builds through Options.window_view" }, { "type": "file_grep", "files": "src/main.zig", "pattern": "on_close\\s*=", "expect": true, "description": "a user close dispatches the descriptor's on_close Msg" }, { "type": "file_grep", "files": "src/*.native", "pattern": "<(dialog|sheet|drawer)[\\s>]", "expect": false, "description": "the inspector is not faked with an in-window modal surface" }, { "type": "snapshot_grep", "patterns": [ "name=\"Open Inspector\"", "name=\"Draft release notes\"", "name=\"Fix flaky test\"", "Inspector: closed" ], "description": "live snapshot shows the task rows, the open button, and the closed status" }, { "type": "llm_judge", "criteria": [ "Secondary-window discipline: windows_fn derives the descriptor list from a model flag (presence is visibility), the canvas label is unique, on_close clears the flag in update, and no-duplicate falls out of the model rather than ad-hoc guards.", "The inspector's view builds from the same model as the main window (selection changes propagate for free); window_view routes by label cleanly.", "Model/Msg/update follow The Elm Architecture idiomatically: selection and inspector-open are the only new state, the status text is derived, update handles every message including the close.", "Tests are meaningful: they open, assert the declared window, exercise the no-duplicate rule and the user-close reset, and check the inspector content follows the selection — through the real dispatch path." ], "description": "quality of the secondary-window wiring beyond compliance" } ] }