feat: add diagnostic web app shell
This commit is contained in:
@@ -70,10 +70,10 @@ interview-ready after each short practice loop.
|
||||
|
||||
### Frontend MVP
|
||||
|
||||
- [ ] **WEB-01**: User can open a web app served by the Go service.
|
||||
- [ ] **WEB-02**: User can create a diagnostic interview session from the web
|
||||
- [x] **WEB-01**: User can open a web app served by the Go service.
|
||||
- [x] **WEB-02**: User can create a diagnostic interview session from the web
|
||||
app.
|
||||
- [ ] **WEB-03**: User can answer a diagnostic question and see rubric feedback.
|
||||
- [x] **WEB-03**: User can answer a diagnostic question and see rubric feedback.
|
||||
- [ ] **WEB-04**: User can see learner memory, readiness, and next challenge
|
||||
after answering.
|
||||
- [ ] **WEB-05**: Operator can ingest source material from the web app.
|
||||
@@ -116,7 +116,7 @@ interview-ready after each short practice loop.
|
||||
| PROG-01..PROG-05 | Phase 4 | Complete |
|
||||
| ONTO-01..ONTO-04 | Phase 5 | Complete |
|
||||
| ASSET-01..ASSET-03 | Phase 6 | Complete |
|
||||
| WEB-01..WEB-03 | Phase 7 | Pending |
|
||||
| WEB-01..WEB-03 | Phase 7 | Complete |
|
||||
| WEB-04 | Phase 8 | Pending |
|
||||
| WEB-05..WEB-08 | Phase 9 | Pending |
|
||||
|
||||
@@ -128,4 +128,4 @@ interview-ready after each short practice loop.
|
||||
|
||||
---
|
||||
*Requirements defined: 2026-04-26*
|
||||
*Last updated: 2026-04-26 after v2 Frontend MVP milestone start.*
|
||||
*Last updated: 2026-04-26 after Phase 7 execution.*
|
||||
|
||||
@@ -7,7 +7,7 @@ See: `.planning/PROJECT.md` (updated 2026-04-26)
|
||||
**Core value:** The user should feel and prove that they are becoming more
|
||||
interview-ready after each short practice loop.
|
||||
|
||||
**Current focus:** v2 Frontend MVP milestone started; ready for Phase 7.
|
||||
**Current focus:** Phase 8 planning: Learning Progress View.
|
||||
|
||||
## Current Decisions
|
||||
|
||||
@@ -37,10 +37,11 @@ interview-ready after each short practice loop.
|
||||
tech-debt items recorded in `.planning/v1-MILESTONE-AUDIT.md`.
|
||||
- v2 Frontend MVP milestone selected to turn the backend learning loop into a
|
||||
usable web service.
|
||||
- Phase 7 web app shell and diagnostic start UI is implemented and verified.
|
||||
|
||||
## Next Actions
|
||||
|
||||
1. Plan and execute Phase 7: Web App Shell and Diagnostic Start.
|
||||
1. Plan and execute Phase 8: Learning Progress View.
|
||||
2. Verify the production OpenAI image model identifier before real image
|
||||
generation calls.
|
||||
3. Add standardized SUMMARY frontmatter or Nyquist validation files if future
|
||||
@@ -76,6 +77,9 @@ interview-ready after each short practice loop.
|
||||
real image generation, and Nyquist validation artifacts remain deferred.
|
||||
- 2026-04-26: v2 Frontend MVP milestone started with WEB-01..WEB-08 mapped to
|
||||
phases 7 through 9.
|
||||
- 2026-04-26: Phase 7 implementation verified with `go test ./...`, OpenSpec
|
||||
validation, root/asset HTTP smoke, and diagnostic API smoke through the
|
||||
server used by the web app.
|
||||
|
||||
---
|
||||
*State initialized: 2026-04-26.*
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
# Phase 7 Context: Web App Shell and Diagnostic Start
|
||||
|
||||
**Status:** Ready for execution
|
||||
**Started:** 2026-04-26
|
||||
|
||||
## Goal
|
||||
|
||||
Serve the first browser UI from the Go backend and let a job seeker start
|
||||
diagnostic practice without API tooling.
|
||||
|
||||
## Requirements
|
||||
|
||||
- WEB-01: User can open a web app served by the Go service.
|
||||
- WEB-02: User can create a diagnostic interview session from the web app.
|
||||
- WEB-03: User can answer a diagnostic question and see rubric feedback.
|
||||
|
||||
## UX Direction
|
||||
|
||||
Visual thesis: quiet interview coaching workspace, dense but readable, with one
|
||||
clear green accent for action and readiness.
|
||||
|
||||
Content plan:
|
||||
|
||||
- left rail: learner setup
|
||||
- main workspace: active diagnostic questions and answer input
|
||||
- right context: grading feedback and evidence
|
||||
|
||||
Interaction thesis:
|
||||
|
||||
- loading states on API actions
|
||||
- inline error region
|
||||
- selected question state and answer result refresh
|
||||
|
||||
## Out of Scope
|
||||
|
||||
- Full progress view.
|
||||
- Material/ontology workspace.
|
||||
- Authentication.
|
||||
@@ -0,0 +1,36 @@
|
||||
# Phase 7 Plan: Web App Shell and Diagnostic Start
|
||||
|
||||
**Status:** Ready for execution
|
||||
**Phase Goal:** Create a working diagnostic web app shell.
|
||||
|
||||
## Tasks
|
||||
|
||||
### 1. Serve embedded web app
|
||||
|
||||
- Add `internal/webapp`.
|
||||
- Embed static app assets.
|
||||
- Register root and asset routes through the existing Go server.
|
||||
|
||||
### 2. Build diagnostic UI
|
||||
|
||||
- Add setup form for user id, target role, stack, and interview timeline.
|
||||
- Create diagnostic session through the real API.
|
||||
- Show returned questions.
|
||||
|
||||
### 3. Build answer and grading UI
|
||||
|
||||
- Let user select a question.
|
||||
- Submit answer through the real API.
|
||||
- Show overall grade, scores, follow-up, and evidence.
|
||||
|
||||
### 4. Verify
|
||||
|
||||
- Add HTTP tests for root web app and asset serving.
|
||||
- Run Go tests, OpenSpec validation, line-count check.
|
||||
- Smoke the rendered app endpoint and diagnostic API flow.
|
||||
|
||||
## Out of Scope
|
||||
|
||||
- Frontend build tooling.
|
||||
- Authentication.
|
||||
- Phase 8 progress panels.
|
||||
@@ -0,0 +1,27 @@
|
||||
# Phase 7 Research: Web App Shell and Diagnostic Start
|
||||
|
||||
## Findings
|
||||
|
||||
The existing Go backend can serve static assets without adding frontend build
|
||||
tooling. For the first MVP UI, plain HTML/CSS/JavaScript is enough and keeps
|
||||
the repo dependency-light.
|
||||
|
||||
The diagnostic APIs already provide all Phase 7 data:
|
||||
|
||||
- `POST /api/v1/diagnostic-sessions`
|
||||
- `POST /api/v1/diagnostic-sessions/{id}/answers`
|
||||
- `GET /api/v1/diagnostic-sessions/{id}`
|
||||
|
||||
## Recommended Shape
|
||||
|
||||
- Add `internal/webapp` with embedded static assets.
|
||||
- Register web app routes from `httpapi.Handler`.
|
||||
- Keep frontend files small and focused.
|
||||
- Use fetch calls directly against existing API routes.
|
||||
|
||||
## Risks
|
||||
|
||||
- A mock UI would not prove the backend loop. The UI must call real APIs.
|
||||
- A marketing-style landing page would distract from the core product surface.
|
||||
- Overbuilding a frontend stack before interaction validation would violate
|
||||
YAGNI.
|
||||
@@ -0,0 +1,37 @@
|
||||
# Phase 7 Summary
|
||||
|
||||
**Status:** Complete
|
||||
**Completed:** 2026-04-26
|
||||
|
||||
## Delivered
|
||||
|
||||
- Added embedded web app serving from the Go backend.
|
||||
- Added `GET /` app shell and `/assets/*` static asset handling.
|
||||
- Built dependency-light HTML/CSS/JavaScript UI for diagnostic practice.
|
||||
- Added setup form for user id, target role, stack, and timeline.
|
||||
- Added real API-backed diagnostic session creation.
|
||||
- Added question selection, answer submission, and rubric feedback rendering.
|
||||
- Added loading, error, empty, and selected-question states.
|
||||
- Added web app route and asset tests.
|
||||
|
||||
## Verification
|
||||
|
||||
```powershell
|
||||
gofmt -w cmd internal
|
||||
go test ./...
|
||||
openspec validate frontend-mvp --strict
|
||||
openspec validate bootstrap-job-tutor-platform --strict
|
||||
```
|
||||
|
||||
Additional smoke check:
|
||||
|
||||
- `GET /` returned the app shell.
|
||||
- `GET /assets/app.js` returned the browser script.
|
||||
- Diagnostic session creation and answer grading succeeded through the same
|
||||
server used by the app.
|
||||
|
||||
## Deferred
|
||||
|
||||
- Progress panels for memory/readiness/next challenge.
|
||||
- Material and asset workspace.
|
||||
- Browser screenshot audit.
|
||||
@@ -0,0 +1,27 @@
|
||||
# Phase 7 Verification
|
||||
|
||||
## Verdict
|
||||
|
||||
PASS
|
||||
|
||||
## Requirement Coverage
|
||||
|
||||
- WEB-01: PASS. The Go service serves the web app at `/`.
|
||||
- WEB-02: PASS. The browser app can create diagnostic sessions through the real
|
||||
backend API.
|
||||
- WEB-03: PASS. The browser app can submit answers and render typed rubric
|
||||
feedback, scores, follow-up, and evidence.
|
||||
|
||||
## Evidence
|
||||
|
||||
- `go test ./...` passed.
|
||||
- `openspec validate frontend-mvp --strict` passed.
|
||||
- `openspec validate bootstrap-job-tutor-platform --strict` passed.
|
||||
- Live root/asset HTTP smoke passed.
|
||||
- Live diagnostic create/answer smoke passed through the same server.
|
||||
|
||||
## Residual Risk
|
||||
|
||||
The UI was verified with HTTP/API smoke but not yet with a browser screenshot
|
||||
audit. Phase 8 should add browser-backed checks once the progress view is
|
||||
included.
|
||||
Reference in New Issue
Block a user