Skip to content

Commit 5f56a8b

Browse files
committed
Add session trace reports and GitHub Pages docs site
1 parent 9a2aac6 commit 5f56a8b

61 files changed

Lines changed: 6687 additions & 30 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pages.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Publish Docs Site
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: "3.12"
29+
30+
- name: Install site generator dependency
31+
run: python -m pip install markdown
32+
33+
- name: Build HTML site
34+
run: python scripts/build_pages_site.py
35+
36+
- name: Configure Pages
37+
uses: actions/configure-pages@v5
38+
39+
- name: Upload Pages artifact
40+
uses: actions/upload-pages-artifact@v3
41+
with:
42+
path: site
43+
44+
deploy:
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deployment.outputs.page_url }}
48+
runs-on: ubuntu-latest
49+
needs: build
50+
steps:
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v4

INSTALL.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ Useful runtime pages:
8585

8686
- `http://127.0.0.1:8000/`
8787
- `http://127.0.0.1:8000/diagnostics/view`
88+
- `http://127.0.0.1:8000/sessions/{session_id}/trace-report`
8889

8990
## Run the Tests
9091

@@ -117,4 +118,7 @@ npm run test:e2e:real
117118

118119
- The normal app runtime is GPU-only and uses the real Diffusers backend.
119120
- The mock generator is reserved for tests and explicit test harnesses only.
121+
- Round generation and feedback submission run as async jobs with visible progress in the UI.
120122
- Trace logs are written under `data/traces/`.
123+
- Per-session trace bundles and readable `report.html` files are written under `data/traces/sessions/<session_id>/`.
124+
- You can generate a complete real GPU example bundle with `python scripts/create_real_e2e_example.py`.

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ This repository now contains:
4949
- a real GPU-backed Diffusers generation workflow
5050
- a deterministic mock generation path reserved for tests
5151
- rich backend logging and persisted trace events
52+
- per-session HTML trace reports that capture proposed images, user actions, and preference outcomes
5253
- frontend trace capture and visible trace panels
5354
- automated API, lifecycle, and browser tests including replay export smoke coverage
5455

@@ -125,19 +126,32 @@ back to mock automatically. The mock generator is reserved for explicit test
125126
harnesses only.
126127

127128
Trace logs are persisted under `data/traces/`.
129+
Per-session reports are written under `data/traces/sessions/<session_id>/report.html` and are also available in the app at `/sessions/{session_id}/trace-report`.
128130

129131
Run a one-off real-model smoke test:
130132

131133
```bash
132134
python scripts/smoke_real_diffusers.py
133135
```
134136

137+
Create a full real GPU-backed example run with a readable HTML walkthrough:
138+
139+
```bash
140+
python scripts/create_real_e2e_example.py
141+
```
142+
135143
Build an optional release zip:
136144

137145
```bash
138146
powershell -ExecutionPolicy Bypass -File scripts/build_release_zip.ps1 -Version v0.1.0
139147
```
140148

149+
Build the static HTML documentation site locally:
150+
151+
```bash
152+
python scripts/build_pages_site.py
153+
```
154+
141155
## Legacy Source
142156

143157
The original combined specification is preserved as:
@@ -146,7 +160,7 @@ The original combined specification is preserved as:
146160

147161
## Next Suggested Steps
148162

149-
- add a diagnostics endpoint for backend, CUDA, and model readiness
150-
- introduce a database-backed repository
151163
- expand browser coverage for pairwise and top-k feedback flows
152-
- add release packaging and bootstrap/install scripts
164+
- add export packaging for session trace bundles
165+
- surface richer GPU diagnostics like adapter name and VRAM in the UI
166+
- add CI automation for the release packaging flow

RELEASE.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ A release should include:
1010
- release notes
1111
- installation instructions
1212
- optional packaged zip artifact
13+
- updated user/developer docs for async jobs, trace reports, and example bundles
1314

1415
Current release notes:
1516

@@ -24,14 +25,16 @@ Current release notes:
2425
`npm run test:e2e:chrome`
2526
4. If releasing from a CUDA-capable machine, optionally run:
2627
`python scripts/smoke_real_diffusers.py`
27-
5. Review:
28+
5. If releasing from a CUDA-capable machine, optionally refresh the real example bundle:
29+
`python scripts/create_real_e2e_example.py`
30+
6. Review:
2831
- [INSTALL.md](E:\Projects\StableSteering\INSTALL.md)
2932
- [README.md](E:\Projects\StableSteering\README.md)
3033
- [RELEASE_NOTES_v0.1.0.md](E:\Projects\StableSteering\RELEASE_NOTES_v0.1.0.md)
31-
6. Build a source zip if needed:
34+
7. Build a source zip if needed:
3235
`powershell -ExecutionPolicy Bypass -File scripts/build_release_zip.ps1 -Version v0.1.0`
33-
7. Create the Git tag.
34-
8. Push the tag and upload the zip if desired.
36+
8. Create the Git tag.
37+
9. Push the tag and upload the zip if desired.
3538

3639
## Suggested Tagging Flow
3740

RELEASE_NOTES_v0.1.0.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ Initial runnable MVP release of StableSteering.
1010
- browser UI for setup, interactive sessions, replay, diagnostics, and trace visibility
1111
- rich backend logging and persisted frontend/backend trace events
1212
- async round generation and feedback submission with visible progress indicators
13+
- per-session HTML trace reports saved by the backend
1314
- replay exports with schema and app version metadata
1415
- Playwright browser coverage, including replay export smoke and diagnostics checks
1516
- opt-in real-backend browser smoke path for CUDA-capable environments
17+
- reusable real GPU-backed end-to-end example bundle generation
1618

1719
## Included Documentation
1820

app/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This folder contains the running StableSteering application.
55
## Structure
66

77
- `main.py`
8-
FastAPI entry point. Builds app state, exposes HTML pages and JSON APIs, accepts frontend trace events, and serves runtime diagnostics.
8+
FastAPI entry point. Builds app state, exposes HTML pages and JSON APIs, accepts frontend trace events, serves runtime diagnostics, and renders saved session trace reports.
99

1010
- `frontend_trace.py`
1111
Shared schema for browser-submitted trace events.
@@ -40,4 +40,4 @@ This folder contains the running StableSteering application.
4040
2. `engine/orchestrator.py` coordinates experiment, session, round, and feedback lifecycle.
4141
3. `engine/generation.py` resolves the active generation backend.
4242
4. `storage/repository.py` persists experiments, sessions, rounds, artifacts, and trace data references.
43-
5. `frontend/` renders the UI and posts browser events back to the backend.
43+
5. `frontend/` renders the UI, submits async jobs, shows progress, and posts browser events back to the backend.

0 commit comments

Comments
 (0)