- Profiler: UserProfile.note (nullable, startup migration), PUT
/profiles/{id}/note (max 1000 chars); add missing `requests`
dependency (client creation failed without Public IP set).
- UI: clickable rows on Certificates open a compact profile details
modal with an editable note; tooltip with the note on the client
name (v-note-tooltip) and a note icon.
- PKI init runs in a background thread: POST /system/init returns 202,
GET /system/init/status, 409 for a second start, Clear PKI and client
creation are blocked while it runs. A marker file identifies an
interrupted run (only such a PKI is wiped on the next Init).
- PKI Configuration page: state from the server, progress spinner and
step text, polling, Init/Clear/Save locked while running, Init locked
once initialized.
- Tests: one pytest each for notes and async init (requirements-dev.txt).
- Docs: plans and summaries in DOCS/Changes, API reference, README, Index.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2.0 KiB
2.0 KiB
Profile details modal and notes: implementation plan (2026-10-04)
Goal: on the Certificates page, rows become clickable. A click opens a modal with the main profile details and a free-text note that can be saved. Profiles have no note field today, so a minimal Profiler change is required to store it.
Steps
1. Profiler backend (APP_PROFILER/)
models.py:UserProfile.note = Column(Text, nullable=True).schemas.py:note: Optional[str]in the response schema; newUserProfileNoteUpdate(max 1000 chars, empty string becomesNone).- Startup migration: idempotent "add column if missing" step (pattern from
APP_CORE/db.py), so existing databases do not fail withno such column. routers/profiles.py:PUT /profiles/{profile_id}/notereturns the updated profile; 404 if not found; JWT required (router-levelverify_token). PUT is used because CORS does not allow PATCH.
2. UI (APP_UI/)
- New
src/components/ProfileDetailsModal.vuebuilt onBaseModal.vue(pattern:NewClientModal.vue): username, status badge, created, expiration, days remaining, revoked date, file path, note textarea, Save / Close. src/views/Certificates.vue: clickable rows (active and expired/revoked),@click.stopon the download/revoke buttons,saveNote()viaprofilesApiClient.put, reload and toast.
3. Tests (minimal)
- One pytest test in
APP_PROFILER:PUT /profiles/{id}/notestores the note andGET /profilesreturns it (temporary DB, auth dependency overridden). - No UI tests (no test infrastructure in
APP_UI).
4. Build and verification (containers)
- Tests and build run in containers; the result is deployed with
docker-composeon this host for manual checks.
5. Documentation
DOCS/Profiler_Management/API_Reference.md,DOCS/General/Index.md,README.md(Changes table).- Summary of the work:
DOCS/Changes/2026-10-04_Profile_Notes.md(written at the end).
Out of scope
Note history, per-user permissions, search by note, other pages.