Repository navigation
docs(tutorials): add the Evidence tutorial - #222
Conversation
|
🏭 Tracked by CCF Factory — view |
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
There was a problem hiding this comment.
ccf-review: REQUEST_CHANGES
2 Must-fix, 1 Should-fix — one inline thread each.
Checks (the task's list, run at head 1512db1 in the review workspace):
- build:
yarn install, thenyarn test(69 tests pass),yarn typecheck,yarn spellcheck(0 issues) andyarn buildall pass — withonBrokenLinks: 'throw'andscripts/gen-sidebars.mjsvalidatinginstances.yamlagainst its schema first. The PR body's claim holds. - style: the STYLE.md "Tutorials page" skeleton and the docs-style checklist hold —
# <what the reader can do>with Takes 10–15 minutes., Before you start, the shared partialdocs/tutorials/_start-demo-environment.mdximported as the content of the first<Step>, one##per stage each closing with a<Checkpoint>+ real screenshot (5 stages after the first, 5 checkpoints), Check your work, Next steps as aCardGroup(text-only cards as the component documents). Sentence-case headings, US spelling, "Continuous Compliance Framework (CCF)" on first use, glossary terms used with the glossary's meaning (the Evidence definition on the page matchesdocs/glossary.md), UI labels in bold and exactly as the UI shows them — spot-verified against theuisources (New Evidence, Create New under the three-dot menu, Re-submit / Re-submit Evidence, Collection Window & Expiry,Search components, parties, users…, Add Link, Label name/Label value, "Expiry date must be after the end date", the six tabs, No expiration date, (expired), Latest Evidence, Go to latest evidence, Compliance over time, Agent health, Previous/Next, Evidence Name, Last Seen At, and the search placeholder). Images are ≤ 1280 px, ≤ 140 KB, named for what they show and every one has alt text; the per-stage<Checkpoint>screenshot is what the Tutorials skeleton prescribes, so the "GIF for a UI flow" preference is not missed here. - versioning:
instances.yamlis untouched and stays valid (the build checks it); no*_versioned_docs/,*_versions.jsonor instance directory is added or edited, so released lines the change does not document are untouched and there is still one version per minor line. Tutorials are unversioned, as the page says. - i18n:
docusaurus.config.tsbuilds one locale (en) and noi18n/translations exist, so nothing is half translated (DOCS-TRANS-001 is gated on more thanen); that locale builds, and the page follows the STYLE.md i18n guidance — English source, no idioms, UI strings, settings and commands left as the UI/API shows them. - accuracy (DOCS-ACC-001): every setting, default, endpoint, permission, UI label, route, placeholder, validation message and field list this diff adds was read at the version the page documents — general pages under
docs/document the default branches, socompliance-framework/uimain(evidence views,EvidenceList,EvidenceHistorySection,SubjectPicker,LinksEditor,BurgerMenu,LeftSideNav,labelfilter.ts,useEvidenceConfig,constants/permissions) andcompliance-framework/apimain(cmd/root.go,internal/service/relational/evidence/service.go,internal/api/handler/evidence.go) — never another docs page. Most claims hold, includingCCF_EVIDENCE_DEFAULT_EXPIRY_MONTHS(1) producing an expiry one month after the End Date, the optional-by-default subject with its operator setting, and evidence being signed as it arrives. Two claims do not — the Must-fix threads.
Not verified here: the six screenshots could not be inspected in this review (this reviewer has no image input), so their invented-data content is taken from the PR description rather than checked against the files. The Should-fix thread records the make demo-up-showcase deviation for a conscious call.
…n the Evidence tutorial - Expiration Date: amber while the expiry is a week or less away (future), red with (expired) once passed, green further out, No expiration date when unset (ui main, ViewView.vue expirationTextClass/expirationLabel). - Re-submit: the form posts empty backMatter.resources (UpdateView.vue), so the latest revision reads 1 links and 0 media items; note the attachment is not carried over.
…the History tab order in the Evidence tutorial
There was a problem hiding this comment.
ccf-review: APPROVE
Re-review of 0cde599 (round 3). Both round-2 threads are resolved and their fixes hold; nothing new to post.
What changed since the last review, one commit touching only docs/tutorials/evidence.mdx:
- The re-submission step now says the Subject picker starts empty. Correct:
EvidenceForm.vue:318startssubjects = ref<SubjectSummary[]>([])and nothing seeds it from the record, andUpdateView.vue:78submits the picked subjects, which "replace any subjects on the evidence being re-submitted". Both files are byte-identical betweenmainandv2.15.2, the release the screenshots were taken from. - The History checkpoint now puts the revisions below the Compliance over time and Agent health charts (body and alt text). Correct:
EvidenceHistorySection.vuerenders the two charts (lines 3-21) before the revisions table (lines 23-75), same atmainandv2.15.2. I checked the component rather than the PNG: this run cannot view images.
Checks
- build — the PR's own checks at this head:
build(Test Build) pass,Spellcheckpass, CodeRabbit skipped. Not re-run locally: the review clone has nonode_modules, and thedocs-sitepack defines no verify commands. - i18n —
docusaurus.config.tshasdefaultLocale: 'en',locales: ['en']and there is noi18n/tree, so the English source is the only locale and the one the build compiles: nothing half-translated, nothing to keep in sync. UI labels stay bolded and settings/queries in code, i.e. untranslated, asSTYLE.mdasks. - versioning — the diff touches no
instances.yaml, no*_versions.jsonand no*_versioned_docs//*_versioned_sidebars/: no released line is documented or disturbed, and the tutorials page sits in the unversioneddocs/tree asSTYLE.mdintends.instances.yamlis unchanged and validated by the build. - style —
STYLE.md"Tutorials page" skeleton and the docs-style checklist hold: title, Takes 10–15 minutes, Before you start, the shared first step imported as the content of the first<Step>, one##per stage closing with a<Checkpoint>and a real screenshot, Check your work, and a Next stepsCardGroup(the three unlanded tutorials are text-only cards, so no stub pages and no broken links). Sentence case, US spelling, no filler, product named in full once. The six PNGs are instatic/img/tutorials/evidence/, ≤ 1280 px wide and ≤ 139 KB, named for what they show and each with alt text. Themake demo-up-showcaseand PNG-vs-GIF deviations stay recorded in the PR body as triaged in round 2.
Accuracy — every label, route, message, field list, default and count on the page was read in the source with gh api …?ref=, at main (the branch the general docs/ pages document) and again at the releases the screenshots come from (ui v2.15.2, api v0.22.5) to make sure nothing on the page is only on the default branch. All twelve ui files the claims rest on are identical across those two refs, and the api expiry/signing/config code is the same at v0.22.5. Spot results: the Global → Evidence nav, the three-dot menu's Evidence → Create New, New Evidence / Re-submit Evidence, the Details / Subject / Labels / Attachments / Links / Properties cards and their exact placeholders, Expiry date must be after the end date with Create Evidence disabled, the permission tooltip on hover, the six tabs in order, the header's Collected / Expiration Date / Summary line and its N labels, N props, N links, N media items format, the expiry colour states and Latest Evidence / Go to latest evidence, the search placeholder and =/!=/AND/OR grammar, and on the api side CCF_EVIDENCE_DEFAULT_EXPIRY_MONTHS defaulting to 1 with the expiry taken from the End Date and evidence signed on the create path. The re-submission counts (1 link row kept, 0 media items) follow from UpdateView.vue posting backMatter.resources = [] over a prefilled linksList. No claim the source does not support.
What this does
Adds the Evidence tutorial,
docs/tutorials/evidence.mdx, the second page of the Tutorials tab and the first hands-on one. Closes #218.docs/tutorials/evidence.mdx: the Tutorials page skeleton fromSTYLE.md, the shared first stepdocs/tutorials/_start-demo-environment.mdximported as the content of the first<Step>, one<Steps>block per stage and a<Checkpoint>with a real screenshot closing every stage after the first. It says Takes 10–15 minutes and the whole thing fits: no part had to be split off into a second tutorial.sidebars.js:tutorials/evidenceadded totutorialsSidebarafter the overview.docs/tutorials/index.md: the Evidence and Catalog group now links to it.static/img/tutorials/evidence/: six PNGs, each named for what it shows and with alt text, all ≤ 1280 px wide and under 140 KB.The five stages are the ones the ticket asks for: create evidence by hand (Details, Subject, Labels, Attachments, Links), set Collection Window & Expiry and create it, read the record's page (Overview, Metadata, Risks, Media, Signature, History, and how the Expiration Date renders when it has passed), find it again on the Evidence list with a label query (
team=widget-team), and re-submit it and read both revisions in History, including Go to latest evidence on the older one. Check your work and a Next stepsCardGroupclose the page. Saving and sharing the search, raising a risk from evidence and plugin-collected evidence are each mentioned in one sentence where they come up and pointed at from Next steps; they are not covered here.Every UI label, route, placeholder and validation message on the page was read from
compliance-framework/uiatmain(the evidence views are unchanged betweenmainandv2.15.2), and the one server-side fact on the page — that an empty Expiry Date becomes one month after the End Date,CCF_EVIDENCE_DEFAULT_EXPIRY_MONTHSdefaulting to1— fromcompliance-framework/apiatmain.Screenshots
The screenshots are not from the seeded local-dev showcase:
local-dev(and somake demo-up-showcase) is not available to this run. They come from a temporary environment this task stood up for them, with fictional data only —compliance-framework/apiv0.22.5against PostgreSQL 18.7, andcompliance-framework/uiv2.15.2(npm run dev) proxying/apito that API. Nothing in them is a real organisation, host, person or credential: the user is the inventedDana Reyes <dana.reyes@example.com>, the subjects and titles are invented ("Alpha widget service", "Example Vendor"), and the extra list rows were created through the API with invented labels. The environment, its database and its processes were torn down afterwards.One checkpoint per stage as #218 asks, so they are PNGs rather than the GIF
STYLE.mdprefers for a UI flow.Recorded deviation (STYLE.md Media / DOCS-MEDIA-001): the rule asks for screenshots recorded against the seeded showcase data (
make demo-up-showcaseinlocal-dev);local-devis not available to this run, so the temporary environment described above stands in for it. The rule's intent holds — no real customer data, credentials or hostnames, and the invented data above (Dana Reyes, "Alpha widget service", "Example Vendor") stays invented. This deviation is recorded here for the reviewer to accept consciously; re-recording the screenshots againstmake demo-up-showcaseoncelocal-devis available is the follow-up.Checks
yarn test(69 tests),yarn typecheck,yarn spellcheckandyarn buildall pass at this head.Decisions taken in this PR
href, because those pages do not exist yet and Tutorial: Evidence #218 says not to stub them:Cardsupports a text-only card, and each card body says which group of the Tutorials overview lists the tutorial. Only the overview card itself links.Open questions for reviewers
hrefs (and this PR's cards be edited), or should each tutorial link the next one by name only? Left as a text-only card for now.