labtasker-webui 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- labtasker_webui-0.1.1/.agents/skills/release/SKILL.md +22 -0
- labtasker_webui-0.1.1/.agents/skills/ui-change/SKILL.md +24 -0
- labtasker_webui-0.1.1/.agents/sops/development.md +102 -0
- labtasker_webui-0.1.1/.agents/sops/qa.md +75 -0
- labtasker_webui-0.1.1/.agents/sops/releasing.md +62 -0
- labtasker_webui-0.1.1/.gitignore +27 -0
- labtasker_webui-0.1.1/AGENTS.md +57 -0
- labtasker_webui-0.1.1/CONTRIBUTING.md +38 -0
- labtasker_webui-0.1.1/LICENSE +201 -0
- labtasker_webui-0.1.1/PKG-INFO +177 -0
- labtasker_webui-0.1.1/README.md +159 -0
- labtasker_webui-0.1.1/assets/screenshot.png +0 -0
- labtasker_webui-0.1.1/docs/reference/specification.md +77 -0
- labtasker_webui-0.1.1/frontend/dist/assets/index-CscGvBx9.css +1 -0
- labtasker_webui-0.1.1/frontend/dist/assets/index-D2PfKj6B.js +54 -0
- labtasker_webui-0.1.1/frontend/dist/index.html +15 -0
- labtasker_webui-0.1.1/frontend/dist/labtasker-icon.png +0 -0
- labtasker_webui-0.1.1/frontend/package-lock.json +3003 -0
- labtasker_webui-0.1.1/frontend/package.json +33 -0
- labtasker_webui-0.1.1/pyproject.toml +70 -0
- labtasker_webui-0.1.1/scripts/check_package.py +39 -0
- labtasker_webui-0.1.1/scripts/check_versions.py +52 -0
- labtasker_webui-0.1.1/src/labtasker_webui/__init__.py +3 -0
- labtasker_webui-0.1.1/src/labtasker_webui/__main__.py +3 -0
- labtasker_webui-0.1.1/src/labtasker_webui/app.py +503 -0
- labtasker_webui-0.1.1/src/labtasker_webui/cli.py +33 -0
- labtasker_webui-0.1.1/src/labtasker_webui/config.py +63 -0
- labtasker_webui-0.1.1/src/labtasker_webui/local.py +22 -0
- labtasker_webui-0.1.1/src/labtasker_webui/operations.py +197 -0
- labtasker_webui-0.1.1/src/labtasker_webui/profile.py +89 -0
- labtasker_webui-0.1.1/src/labtasker_webui/py.typed +0 -0
- labtasker_webui-0.1.1/src/labtasker_webui/schemas.py +80 -0
- labtasker_webui-0.1.1/src/labtasker_webui/security.py +53 -0
- labtasker_webui-0.1.1/src/labtasker_webui/sessions.py +51 -0
- labtasker_webui-0.1.1/src/labtasker_webui/upstream.py +140 -0
- labtasker_webui-0.1.1/tests/fixture_server.py +160 -0
- labtasker_webui-0.1.1/tests/packaging_smoke.py +136 -0
- labtasker_webui-0.1.1/tests/test_app.py +219 -0
- labtasker_webui-0.1.1/tests/test_config.py +37 -0
- labtasker_webui-0.1.1/tests/test_custom_columns.py +13 -0
- labtasker_webui-0.1.1/tests/test_local.py +130 -0
- labtasker_webui-0.1.1/tests/test_operations.py +152 -0
- labtasker_webui-0.1.1/tests/test_profile.py +106 -0
- labtasker_webui-0.1.1/tests/test_real_server.py +26 -0
- labtasker_webui-0.1.1/tests/test_release_versions.py +30 -0
- labtasker_webui-0.1.1/tests/test_sessions.py +26 -0
- labtasker_webui-0.1.1/tests/test_upstream.py +137 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: release
|
|
3
|
+
description: Prepare or validate Labtasker WebUI release versions, artifacts, tags, or PyPI publication; not for routine frontend builds.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Release Labtasker WebUI
|
|
7
|
+
|
|
8
|
+
Follow root `AGENTS.md` and `.agents/sops/releasing.md`. This is a single WebUI distribution,
|
|
9
|
+
not the three-package Labtasker workspace; do not copy its Worker/distributed test gate.
|
|
10
|
+
|
|
11
|
+
1. Establish the requested version and authorized stage: preparation, commit, tag, push,
|
|
12
|
+
GitHub Release or publication. Authorization for preparation is not publication.
|
|
13
|
+
2. Inspect branch, remotes, tags and dirty work. Preserve unrelated changes.
|
|
14
|
+
3. Update the Python metadata/runtime and frontend manifest/lockfile versions together.
|
|
15
|
+
Run `uv lock`, then `uv run python scripts/check_versions.py --tag vVERSION`.
|
|
16
|
+
4. Run the ordinary gate in `.agents/sops/development.md`. Verify wheel-from-sdist installation,
|
|
17
|
+
bundled assets and no Node.js runtime dependency. Do not replace tested artifacts.
|
|
18
|
+
5. Write Labtasker-style user-facing release notes. Report compatibility actions precisely;
|
|
19
|
+
do not invent release history or a version-only changelog.
|
|
20
|
+
6. Only when explicitly authorized, publish the matching GitHub Release. The workflow
|
|
21
|
+
rechecks the gate and publishes through the protected `pypi` OIDC environment.
|
|
22
|
+
7. Report actual release/workflow URLs or explicitly state which external steps remain.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ui-change
|
|
3
|
+
description: Reproduce and fix a Labtasker WebUI interaction, state, or layout defect; use for UI behavior changes and browser regressions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Change Labtasker WebUI behavior
|
|
7
|
+
|
|
8
|
+
Read root `AGENTS.md`, `docs/reference/specification.md`, and the relevant section of
|
|
9
|
+
`.agents/sops/qa.md`. Preserve real workloads; use the synthetic fixture. Inspect the current
|
|
10
|
+
diff and do not include unrelated changes.
|
|
11
|
+
|
|
12
|
+
1. Reproduce using the current frontend build. Record viewport, browser, trigger and
|
|
13
|
+
expected result. For focus/menu behavior include WebKit.
|
|
14
|
+
2. Trace the responsible state and event/request order. Distinguish draft versus applied
|
|
15
|
+
filters, local versus persisted settings, and connection/Queue/view scopes.
|
|
16
|
+
3. Add a regression for the failure, then fix the owning component. Prefer existing
|
|
17
|
+
anchored-panel, Select, tooltip and persistence helpers over parallel implementations.
|
|
18
|
+
4. Build assets before browser tests. Run one Playwright invocation at a time. Exercise
|
|
19
|
+
the affected cases from the QA matrix; inspect screenshots/traces for visual failures.
|
|
20
|
+
5. Update the contract/docs when behavior changes. Run proportional final checks from
|
|
21
|
+
`.agents/sops/development.md`; report results and limitations without claiming zero defects.
|
|
22
|
+
|
|
23
|
+
Do not add confirmation prompts to routine view switching, mutate lingbot queues,
|
|
24
|
+
reintroduce forced Apply for dropdowns, or weaken tests to accept a broken interaction.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Development and debugging SOP
|
|
2
|
+
|
|
3
|
+
## Setup
|
|
4
|
+
|
|
5
|
+
Use Python 3.11+ and Node.js 22 (`.nvmrc`). From the repository root:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm ci --prefix frontend
|
|
9
|
+
npm --prefix frontend run build
|
|
10
|
+
uv sync --group dev --frozen
|
|
11
|
+
uv run pre-commit install
|
|
12
|
+
cd frontend
|
|
13
|
+
npx playwright install chromium firefox webkit
|
|
14
|
+
cd ..
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Install Playwright's OS dependencies on Linux with `npx playwright install --with-deps`
|
|
18
|
+
from `frontend/`. Do not reinstall or upgrade dependencies merely to fix a CSS rule
|
|
19
|
+
when the existing environment already works.
|
|
20
|
+
|
|
21
|
+
## Run and rebuild
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
uv run labtasker-webui --host 127.0.0.1 --port 8080
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The CLI serves built `frontend/dist` assets. After frontend edits, run
|
|
28
|
+
`npm --prefix frontend run build` and refresh the browser. Python changes require a
|
|
29
|
+
WebUI restart. Confirm the working directory, command, PID and listening port before
|
|
30
|
+
stopping a process; restart only that WebUI process, never the connected Labtasker.
|
|
31
|
+
If a process is owned by another task or supervisor, use its normal restart mechanism.
|
|
32
|
+
|
|
33
|
+
For an isolated manual session, use another port and `--no-profile`. The default CLI
|
|
34
|
+
loads `.labtasker/` relative to its working directory, not the connected project's path.
|
|
35
|
+
The connection page controls HTTP/local mode. Keep the CLI limited to host, port and
|
|
36
|
+
profile persistence. Local attachment requires the Labtasker instance to be running.
|
|
37
|
+
|
|
38
|
+
## Change loop
|
|
39
|
+
|
|
40
|
+
1. Reproduce the issue with the current built UI or a focused backend test.
|
|
41
|
+
2. Identify state ownership, request parameters and event order before editing.
|
|
42
|
+
3. Add a regression for the user-visible failure. Use synthetic data for mutations.
|
|
43
|
+
4. Make the smallest coherent change and run the relevant checks below.
|
|
44
|
+
5. For broad changes, run the full ordinary gate; update docs and report actual results.
|
|
45
|
+
|
|
46
|
+
Do not run multiple Playwright commands concurrently: port ownership, mutable fixture
|
|
47
|
+
state and trace output are shared. Playwright intentionally fails on occupied test
|
|
48
|
+
ports rather than silently using an unknown server. Ports are 18765 (fixture upstream)
|
|
49
|
+
and 18766 (isolated WebUI). Diagnose their owner; do not use `pkill` or blanket cleanup.
|
|
50
|
+
|
|
51
|
+
## Troubleshooting
|
|
52
|
+
|
|
53
|
+
| Symptom | Inspect first | Recovery |
|
|
54
|
+
| --- | --- | --- |
|
|
55
|
+
| UI still looks unchanged | Build success, loaded asset filename, served working directory | Rebuild assets and reload |
|
|
56
|
+
| Backend change has no effect | Running WebUI command and process | Restart that WebUI only |
|
|
57
|
+
| Connection fails | HTTP scheme, upstream health, server logs, local socket availability | Correct the connection; do not expose the token |
|
|
58
|
+
| Invalid filter | Inline error and API response | Correct the expression; invalid requests must not retry endlessly |
|
|
59
|
+
| Profile cannot save | Directory permissions, disk capacity, `Retry` notification | Restore write access and retry; pending browser changes must survive reload |
|
|
60
|
+
| Browser test fails before starting | Occupied fixture ports or missing browsers | Resolve the owner/install browsers, then rerun one suite |
|
|
61
|
+
| Popup is clipped | Viewport size, fixed positioning, scroll container, focus events | Reproduce with the boundary/keyboard QA matrix |
|
|
62
|
+
|
|
63
|
+
Never dump `.zshrc`, all environment variables, `.labtasker/`, cookies or request
|
|
64
|
+
headers into logs. Inspect only the specific configuration needed and redact credentials.
|
|
65
|
+
|
|
66
|
+
## Dependency changes
|
|
67
|
+
|
|
68
|
+
Commit npm manifest and lockfile together; use `npm ci` elsewhere. Use `uv lock` to
|
|
69
|
+
regenerate the Python lockfile and `uv sync --group dev --frozen` for ordinary installs.
|
|
70
|
+
Do not edit lockfile records manually. CI uses the same lock across its Python matrix.
|
|
71
|
+
Keep Actions pinned to commit SHAs and let Dependabot propose uv/npm/Action updates.
|
|
72
|
+
Review migration notes and rerun affected checks.
|
|
73
|
+
|
|
74
|
+
## Ordinary validation gate
|
|
75
|
+
|
|
76
|
+
Run from the repository root. The project is a single distribution, so unlike the
|
|
77
|
+
Labtasker workspace it does not need `--all-packages`.
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
uv sync --group dev --frozen
|
|
81
|
+
uv run python scripts/check_versions.py
|
|
82
|
+
uv run ruff format --check src tests scripts
|
|
83
|
+
uv run ruff check src tests scripts
|
|
84
|
+
uv run mypy
|
|
85
|
+
uv run pytest -m 'not integration'
|
|
86
|
+
npm --prefix frontend test
|
|
87
|
+
npm --prefix frontend run build
|
|
88
|
+
npm --prefix frontend run test:e2e
|
|
89
|
+
uv run python scripts/check_package.py
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The last command runs `uv build --sdist`, builds its wheel from that archive, validates
|
|
93
|
+
metadata and smoke-tests a clean installation. It does not publish. For routine docs-only
|
|
94
|
+
changes, validate local links and applicable examples rather than rerunning unrelated
|
|
95
|
+
runtime tests. The local pre-commit hooks check whitespace/YAML/large files and run Ruff,
|
|
96
|
+
matching the Labtasker series. CI remains the authoritative full gate.
|
|
97
|
+
|
|
98
|
+
## Agent workflows
|
|
99
|
+
|
|
100
|
+
Start with root `AGENTS.md`. Focused instructions live in `.agents/skills/ui-change/`
|
|
101
|
+
and `.agents/skills/release/`; use them only for relevant work. Keep lasting product
|
|
102
|
+
decisions in `docs/reference/specification.md`, not in throwaway plans.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# QA SOP
|
|
2
|
+
|
|
3
|
+
## Data and environment
|
|
4
|
+
|
|
5
|
+
Browser tests use `tests/fixture_server.py` and an isolated `--no-profile` WebUI.
|
|
6
|
+
They must not inherit real endpoint/token configuration or mutate real workloads.
|
|
7
|
+
For live manual testing, use read-only access by default. Explicitly authorized dummy
|
|
8
|
+
Task changes are limited to `default`, using recognizable names/routes and exact IDs.
|
|
9
|
+
Never mutate any `lingbot` queue. Do not delete a whole queue to clean up test data.
|
|
10
|
+
|
|
11
|
+
## Commands
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
uv run pytest -m 'not integration'
|
|
15
|
+
npm --prefix frontend test
|
|
16
|
+
npm --prefix frontend run build
|
|
17
|
+
npm --prefix frontend run test:e2e
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Always rebuild the served assets before running browser tests. Do not rebuild while
|
|
21
|
+
backend or browser tests are running: Vite replaces the assets used by the editable
|
|
22
|
+
Python installation. For a focused run:
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
npm --prefix frontend run build
|
|
26
|
+
npm --prefix frontend run test:e2e -- --grep 'audit:' --project webkit
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The standard suite covers Chromium, Firefox and WebKit. Keep fixtures and suites serial;
|
|
30
|
+
opening parallel Playwright runs can corrupt both data and diagnostic artifacts.
|
|
31
|
+
A read-only real-server contract test is opt-in:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
LABTASKER_REAL_SERVER_URL=http://127.0.0.1:8000 uv run pytest -m integration tests/test_real_server.py
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Set `LABTASKER_REAL_SERVER_TOKEN` through an existing secure mechanism if needed; never
|
|
38
|
+
paste it into committed scripts or captured shell output.
|
|
39
|
+
|
|
40
|
+
## Interaction review matrix
|
|
41
|
+
|
|
42
|
+
| Area | Cases to verify |
|
|
43
|
+
| --- | --- |
|
|
44
|
+
| Layout | 1440×900 desktop, 900×600 short window, 390×700 narrow window; no document-level horizontal overflow |
|
|
45
|
+
| Popups | Every edge; resize while open; many options; long names; internal scrolling; Escape, outside click and Tab |
|
|
46
|
+
| Keyboard | Arrow keys/Home/End follow visible active option; Enter applies; IME Enter does not submit prematurely |
|
|
47
|
+
| Filters | Dropdowns/presets immediate; text blur/Enter; clear; invalid input and correction; counts match applied selectors |
|
|
48
|
+
| Navigation | Queue → filter → drawer → back/forward; URL and visible state agree |
|
|
49
|
+
| Selection | Empty/partial/all checkbox; sorting retains selection; filtering clears selection; append keeps existing selection |
|
|
50
|
+
| Columns | Independent resize; double-click fit; drag order; missing JSON paths blank; path casing preserved; reload restoration |
|
|
51
|
+
| Views | Create/save/rename/copy/reset/delete; no Task deletion on view deletion; queue and connection isolation |
|
|
52
|
+
| Lists | Empty, one row, many rows; long names/routes; mixed statuses; signed priorities; virtualized scroll and retry |
|
|
53
|
+
| Drawer | Switch directly between rows, including during a pending or failed action; no cross-Task errors or disabled controls; close/focus restoration; keyboard access; narrow-screen sizing |
|
|
54
|
+
| Persistence | Restart/reload; failed save/retry; unsaved browser changes survive profile reload; large UTF-8 payloads; stalled saves time out; credentials never in UI responses |
|
|
55
|
+
| Batch deletion | Slow submission cannot duplicate; status-read failure can retry or close; failed stop stays visible; capacity never evicts active operations |
|
|
56
|
+
| Failures | Upstream timeout, invalid filter, authorization loss and slow reconnection without stale cached Tasks, failed append; useful recovery without false success |
|
|
57
|
+
|
|
58
|
+
For each reported defect, record trigger, expected behavior, actual behavior, and a
|
|
59
|
+
regression test. Do not replace a failing assertion with a wait unless there is an
|
|
60
|
+
observable asynchronous condition to wait for. Update stale selectors when the product
|
|
61
|
+
has intentionally changed, preserving the original behavior being tested.
|
|
62
|
+
|
|
63
|
+
## Evidence and completion
|
|
64
|
+
|
|
65
|
+
Failed browser tests retain traces/screenshots in `frontend/test-results/`; CI uploads
|
|
66
|
+
these as artifacts. Open a fixture trace from `frontend/` with:
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
npx playwright show-trace test-results/PATH/trace.zip
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Never upload traces from authenticated real workloads without reviewing/redacting them.
|
|
73
|
+
A passing test suite only covers the listed scenarios. Report skipped integration tests,
|
|
74
|
+
untested platforms, and unresolved issues explicitly; do not claim the entire product
|
|
75
|
+
is defect-free. Distinguish a local verification from an actual GitHub Actions run.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Release SOP
|
|
2
|
+
|
|
3
|
+
## Preconditions
|
|
4
|
+
|
|
5
|
+
A maintainer must configure the `pypi` GitHub environment and the package's PyPI
|
|
6
|
+
Trusted Publisher for workflow `release.yml`. Use environment protection and branch
|
|
7
|
+
protection appropriate to the repository. The workflow's `required` job is the stable
|
|
8
|
+
branch-protection check; repository settings must enable it separately.
|
|
9
|
+
|
|
10
|
+
Do not publish merely to test packaging. Local verification does not require GitHub or
|
|
11
|
+
PyPI credentials and does not push commits, create tags, or upload distributions.
|
|
12
|
+
|
|
13
|
+
## Prepare
|
|
14
|
+
|
|
15
|
+
1. Update `pyproject.toml`, `src/labtasker_webui/__init__.py`,
|
|
16
|
+
`frontend/package.json`, and `frontend/package-lock.json` together. Regenerate
|
|
17
|
+
`uv.lock` for the changed project version. Use a new, unpublished version.
|
|
18
|
+
2. Update user-facing docs and write release notes explaining changes and migrations.
|
|
19
|
+
3. Run the ordinary gate in [development.md](development.md) from the repository root. This performs static/unit checks,
|
|
20
|
+
a fresh frontend build, three-browser regressions, and package verification.
|
|
21
|
+
4. Review the diff and `git status`. Exclude `.labtasker/`, credentials, traces,
|
|
22
|
+
node_modules, caches and local build output. Do not discard unrelated work.
|
|
23
|
+
5. Review and merge through the repository's normal process. Publishing requires
|
|
24
|
+
explicit maintainer authorization.
|
|
25
|
+
|
|
26
|
+
`uv run python scripts/check_package.py` builds into a fresh temporary directory to avoid mixing stale versions.
|
|
27
|
+
`uv build --sdist` creates the source archive; a second `uv build` builds its wheel.
|
|
28
|
+
The smoke test installs that wheel into a clean environment and runs it with no Node.js
|
|
29
|
+
on PATH, checks frontend assets and a synthetic upstream connection. Temporary local
|
|
30
|
+
verification artifacts are removed afterwards.
|
|
31
|
+
|
|
32
|
+
## Publish
|
|
33
|
+
|
|
34
|
+
Create the matching `vVERSION` tag and publish its GitHub Release after approval.
|
|
35
|
+
The release workflow verifies all version declarations and tag equality, calls full CI,
|
|
36
|
+
and publishes only the resulting `python-dist` artifact after CI succeeds. The publishing
|
|
37
|
+
job uses OIDC in the `pypi` environment; no long-lived PyPI API token is needed.
|
|
38
|
+
|
|
39
|
+
Do not replace the tested artifact with a local rebuild during the publishing step.
|
|
40
|
+
Manually running CI builds downloadable artifacts but does not publish.
|
|
41
|
+
|
|
42
|
+
## Failure and recovery
|
|
43
|
+
|
|
44
|
+
- Validation failure: fix the defect and rerun checks; do not bypass failing jobs.
|
|
45
|
+
- OIDC/environment failure: check the owner/repository/workflow/environment publisher
|
|
46
|
+
configuration. Do not solve it by committing an API token.
|
|
47
|
+
- Partial publish: inspect PyPI before retrying. Published files/versions are immutable;
|
|
48
|
+
do not delete/recreate a tag to disguise a different artifact as the same release.
|
|
49
|
+
- Product regression after release: issue a corrected version. A maintainer may yank a
|
|
50
|
+
broken version with an explanation. Users can temporarily pin the last known good
|
|
51
|
+
version; do not overwrite their `.labtasker/` profile/token during rollback.
|
|
52
|
+
|
|
53
|
+
After publication, verify installation of the released version and record the actual
|
|
54
|
+
workflow/release URLs. Never claim publication solely because local packaging passed.
|
|
55
|
+
|
|
56
|
+
## Release-note style
|
|
57
|
+
|
|
58
|
+
Follow the Labtasker series: title the release `vVERSION`; use short `Add`, `Change`
|
|
59
|
+
and `Fix` bullets ending with periods, ordered by user impact. Describe user-visible
|
|
60
|
+
outcomes, not every internal test/refactor. Put an important compatibility notice first
|
|
61
|
+
only when users must act. Include a comparison link after the first published release.
|
|
62
|
+
Do not create a version-only changelog when no maintained changelog exists.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.venv/
|
|
2
|
+
.pytest_cache/
|
|
3
|
+
.tmp/
|
|
4
|
+
dist/
|
|
5
|
+
frontend/node_modules/
|
|
6
|
+
frontend/dist/
|
|
7
|
+
frontend/*.tsbuildinfo
|
|
8
|
+
frontend/vite.config.js
|
|
9
|
+
frontend/vite.config.d.ts
|
|
10
|
+
frontend/playwright-report/
|
|
11
|
+
frontend/test-results/
|
|
12
|
+
**/__pycache__/
|
|
13
|
+
*.pyc
|
|
14
|
+
.gstack/
|
|
15
|
+
|
|
16
|
+
# Local agent artifacts and development caches
|
|
17
|
+
.superpowers/
|
|
18
|
+
docs/superpowers/
|
|
19
|
+
.gstack/
|
|
20
|
+
.mypy_cache/
|
|
21
|
+
.ruff_cache/
|
|
22
|
+
.DS_Store
|
|
23
|
+
|
|
24
|
+
**/.labtasker/webui-profile.json
|
|
25
|
+
**/.labtasker/.webui-profile-*
|
|
26
|
+
|
|
27
|
+
**/.labtasker/webui-token
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Labtasker WebUI agent guide
|
|
2
|
+
|
|
3
|
+
## Project context and boundaries
|
|
4
|
+
|
|
5
|
+
- Read this file and [CONTRIBUTING.md](CONTRIBUTING.md) before changing the project.
|
|
6
|
+
- Keep source comments, UI copy, documentation, and project metadata in English. There is no i18n layer yet. Preserve user-provided data and JSON-path casing.
|
|
7
|
+
- This is a WebUI/BFF for an existing Labtasker v2 instance. Do not add Task submission/editing, a scheduler, database access, or automatic Labtasker lifecycle management without a product request.
|
|
8
|
+
- Local mode attaches to an already-running project's Unix socket. It must not start, stop, restart, or open the database of that instance.
|
|
9
|
+
- Never modify `lingbot` queues or other real workloads during testing. Use the isolated fixture by default. Live dummy mutations require explicit authorization and must stay within `default` and clearly identified test Task IDs.
|
|
10
|
+
- Never print tokens, source a user's whole shell configuration, commit profiles, or upload authenticated browser traces. Credentials belong only on the backend and in `.labtasker/webui-token` with mode `0600`.
|
|
11
|
+
- Preserve existing uncommitted work. Do not reset/stash it, restart unrelated processes, or publish releases merely to complete a check.
|
|
12
|
+
|
|
13
|
+
## Sources of truth
|
|
14
|
+
|
|
15
|
+
- `docs/reference/specification.md` records the maintained WebUI contract and state ownership. Follow the Labtasker v2 specification for upstream Task, Queue, Client and Server semantics.
|
|
16
|
+
- `README.md` and `docs/` explain the product. Update them when observable behavior changes.
|
|
17
|
+
- Keep internal development, QA and release SOPs in `.agents/sops/`, with focused agent workflows in `.agents/skills/`. Do not put internal operating procedures in product documentation.
|
|
18
|
+
- Tests are executable invariants, not a substitute for the contract. Change implementation, tests and affected guidance together.
|
|
19
|
+
- Follow the Labtasker series' terminology, uv/Ruff workflow and small product boundary. Do not recreate parallel planning/comparison documents or import unrelated Server/Worker responsibilities.
|
|
20
|
+
|
|
21
|
+
## Working agreements
|
|
22
|
+
|
|
23
|
+
- Use `uv sync --group dev --frozen` and `uv run` from the repository root for Python. Use the existing npm lockfile for the frontend; do not introduce another package manager or environment.
|
|
24
|
+
- Keep public concepts capitalized as Task, Queue, Worker, Client and Server. Keep generated assets, lockfile records and local `.labtasker/` data owned by their tools.
|
|
25
|
+
- Use `.agents/skills/ui-change` for interface regressions and `.agents/skills/release` for release readiness/publication. These are focused WebUI adaptations of the Labtasker repository workflows.
|
|
26
|
+
- Do not commit, tag, push, create a release or publish unless the user explicitly authorizes that action.
|
|
27
|
+
|
|
28
|
+
## Project map
|
|
29
|
+
|
|
30
|
+
- `frontend/src/`: React UI; `App.tsx` contains the queue workspace and Task drawer.
|
|
31
|
+
- `frontend/src/useAnchoredPanel.ts`: viewport-aware dropdown/help positioning.
|
|
32
|
+
- `frontend/src/queueLayout.ts`, `Views.tsx`, `profile.ts`: layout, named views, persistence.
|
|
33
|
+
- `src/labtasker_webui/`: FastAPI BFF, upstream transport, sessions, local attachment, profile persistence.
|
|
34
|
+
- `tests/fixture_server.py`: synthetic upstream for browser/package tests.
|
|
35
|
+
- `frontend/e2e/`: Playwright interaction regressions; `tests/`: backend contracts.
|
|
36
|
+
- `.github/workflows/`: CI and gated PyPI publishing.
|
|
37
|
+
|
|
38
|
+
## Interaction contracts
|
|
39
|
+
|
|
40
|
+
- Preserve breadcrumbs and the compact, information-dense layout. Do not reintroduce a duplicate queue heading or large decorative spacing.
|
|
41
|
+
- Queue layout and named views are scoped by connection identity **and** queue. Never reintroduce a global columns fallback.
|
|
42
|
+
- Dropdowns and presets apply immediately. Text filters apply on Enter or leaving the input group; Apply is a fallback. Respect IME composition.
|
|
43
|
+
- Counts describe the same applied selectors as the list. Sorting preserves selection; changing the filter range clears it.
|
|
44
|
+
- Browser history restores queue, applied filters and drawer consistently. Partial selection uses the native checkbox `indeterminate` property.
|
|
45
|
+
- Resizing changes only the chosen column. Double-click fits content. Reordering preserves paths and uses a drop line, not a shaded target row.
|
|
46
|
+
- Every popup must fit the viewport, support scrolling and Escape/outside dismissal, and remain usable with keyboard navigation. Check Safari/WebKit focus behavior, not only Chromium.
|
|
47
|
+
- Missing custom JSON-path values stay blank. Negative priorities remain valid; positive/negative arrows use red/blue.
|
|
48
|
+
- Saved-view switching does not interrupt the user with an unsaved-changes prompt. Saving a view is explicit; normal profile saves stay quiet, failures offer recovery.
|
|
49
|
+
|
|
50
|
+
## Validation and delivery
|
|
51
|
+
|
|
52
|
+
- Run the ordinary gate in `.agents/sops/development.md`: frozen uv sync, version checks, Ruff format/lint, mypy, pytest, frontend tests/build, three-browser tests and artifact smoke verification. Run browser suites serially: fixtures and artifacts are shared.
|
|
53
|
+
- For UI behavior fixes, reproduce the failure, add or update a behavior-level regression, and test the actual built UI. Do not use sleeps or weaken assertions to hide a failure.
|
|
54
|
+
- Prefer existing components and tests over new dependencies. Do not mass-format unrelated files.
|
|
55
|
+
- Complete that gate before release preparation or broad infrastructure changes. `uv run python scripts/check_package.py` verifies an sdist-built wheel in a clean environment without Node.js.
|
|
56
|
+
- Follow [development](.agents/sops/development.md), [QA](.agents/sops/qa.md), and [release](.agents/sops/releasing.md) SOPs. Update affected docs when behavior changes.
|
|
57
|
+
- Report actual checks, failures/skips, and remaining limits. A local green run does not prove that GitHub Actions ran or that a package was published.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Read [AGENTS.md](AGENTS.md) for product boundaries and working agreements.
|
|
4
|
+
This repository follows the Labtasker series: uv-managed Python environments,
|
|
5
|
+
a frozen lockfile, Ruff formatting/linting, strict typing and explicit capability
|
|
6
|
+
boundaries. npm and Playwright cover the WebUI-specific frontend.
|
|
7
|
+
|
|
8
|
+
Use Python 3.11+ and Node.js 22 (`.nvmrc`). From the repository root:
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
npm ci --prefix frontend
|
|
12
|
+
npm --prefix frontend run build
|
|
13
|
+
uv sync --group dev --frozen
|
|
14
|
+
uv run pre-commit install
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Building the frontend first makes assets available to the editable Python package.
|
|
18
|
+
Install browsers once, from `frontend/`, with
|
|
19
|
+
`npx playwright install chromium firefox webkit`.
|
|
20
|
+
|
|
21
|
+
- [Development and ordinary validation gate](.agents/sops/development.md)
|
|
22
|
+
- [UI and integration QA](.agents/sops/qa.md)
|
|
23
|
+
- [Release and rollback](.agents/sops/releasing.md)
|
|
24
|
+
- [WebUI specification and state ownership](docs/reference/specification.md)
|
|
25
|
+
|
|
26
|
+
## Pull requests
|
|
27
|
+
|
|
28
|
+
Explain the concrete problem, resulting behavior and actual validation. Include
|
|
29
|
+
behavioral regressions and screenshots for layout changes. Keep unrelated formatting
|
|
30
|
+
out of the diff. Do not attach private profiles, tokens or authenticated traces.
|
|
31
|
+
|
|
32
|
+
Use `uv lock` after Python dependency changes and commit the generated lockfile.
|
|
33
|
+
Commit npm manifest/lockfile changes together; use `npm ci` for ordinary installs.
|
|
34
|
+
CI and local development use the same frozen uv resolution.
|
|
35
|
+
|
|
36
|
+
Before merge or release preparation, run the ordinary gate in `.agents/sops/development.md`.
|
|
37
|
+
Configure the `required` CI job as a required branch-protection check in repository
|
|
38
|
+
settings; workflow files alone do not enable branch protection.
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|