No-AI desktop path: PyQt bot wired to the page
- templates/bot_runner.py (new, no Qt): runs the bot as a child process (unbuffered, UTF-8), tails its output, keeps raw lines in bot_raw.log, and turns lines into step/log/status events. Step markers and friendly rules use specific substrings, first match wins; unmatched error lines are always shown, other unmatched lines hidden. Dry run: python dashboard/bot_runner.py prints the events the page would get. - bridge.py: delegates to bot_runner, one run at a time, restores the saved dark mode on every page load (fixes sample-data mode in PyQt), adds load_latest_report / download_report slots the page calls. - SKILL.md: skip the stack question for a PyQt project; desktop wiring steps from the bot's real output; verify steps for the host. - tests: assert-based self-check for the line logic and run loop; Seam 1 run replay (status dot, Run button, steps, log) and wired-page mode; fixture b-pyqt-bot and its Seam 2 eval (all 14 checks pass). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3eb3fdf00e
commit
162edd41df
17 files changed
+753
-47
No files matched your search
@@ -1,6 +1,7 @@
|
||||
"""No-AI contract cases: events in, visible result out (see templates/contract.md)."""
|
||||
import re
|
||||
|
||||
import pytest
|
||||
from playwright.sync_api import expect
|
||||
|
||||
|
||||
@@ -146,6 +147,7 @@ def expect_sample_dashboard(page):
|
||||
kpi(page, "Total batches", n)
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("sample_data")
|
||||
def test_no_bot_page_runs_on_sample_data(page):
|
||||
"""No bot yet: the page answers its own data actions, so it works on day one."""
|
||||
expect_sample_dashboard(page)
|
||||
@@ -162,6 +164,7 @@ def test_no_bot_page_runs_on_sample_data(page):
|
||||
expect(run).to_be_enabled()
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("sample_data")
|
||||
def test_plain_browser_first_open_shows_sample_data(browser, page_url):
|
||||
pg = browser.new_page()
|
||||
pg.goto(page_url)
|
||||
|
||||
Reference in new issue
Block a user