Skip to content

QUA-1756: Restructure anomaly docs and document Assignees#1121

Open
RafaelOsiro wants to merge 14 commits into
mainfrom
qua-1756-anomaly-assignees
Open

QUA-1756: Restructure anomaly docs and document Assignees#1121
RafaelOsiro wants to merge 14 commits into
mainfrom
qua-1756-anomaly-assignees

Conversation

@RafaelOsiro

@RafaelOsiro RafaelOsiro commented May 18, 2026

Copy link
Copy Markdown
Contributor

Overview

Restructures the Anomalies section into Deep Dive and How-tos hubs and documents the new Assignees feature end-to-end.

Key Changes

  • anomalies/deep-dive/: new hub grouping Insights, Source Record, Types, Status, Fingerprints, and the new Assignees deep-dive.
  • anomalies/how-tos/: replaces Manage Anomalies; adds Edit Description and Edit Tags (split from Edit Anomalies) plus the new Assignee subgroup (Add, Remove, Bulk-Assign).
  • anomalies/api.md: new Anomalies API reference with a dedicated Manage assignees subsection.
  • anomalies/faq.md: new Anomalies FAQ covering General, Types, Status, Fingerprints, Tags, Comments, Source Records, Assignees, Permissions, Filtering, and Bulk Operations.
  • explore/anomalies.md: documents the new Assigned subtab and Assignees filter.
  • mkdocs.yml: nav restructured to match the new hubs and redirects added for every legacy path.

Pages to Test

Editorial polish round

  • http://localhost:8000/anomalies/deep-dive/status/ — Open/Archived tables no longer list "All" as a status; !!! info admonition rewritten to describe Duplicate vs Discarded in terms of future-scan re-opening (validated against scan re-open logic); table headers normalized to Status | Description; intros now declare "two sub-statuses" and "four sub-statuses" symmetrically.

  • http://localhost:8000/anomalies/deep-dive/source-record/ — TODO comment at the top flags future refactor of how-to content out of the Deep Dive (memory exception registered); sort table label is Importance (matches frontend); setting referenced consistently as Maximum Source Examples per Anomaly; ***MASKED*** literal documented; Editor team permission + Admin role terminology applied.

  • http://localhost:8000/anomalies/how-tos/filter-by-status/ — Table headers normalized to | No. | Status | Description |; Step 2 reads "colored indicator" (not "icon"); 4 tabs preserved per affirming-capability convention (tables intentionally repeat per entry point).

  • http://localhost:8000/anomalies/how-tos/tags/add-tags/ — Lead now includes API link; Step 3 reads "Start typing to narrow the list"; Step 4 uses "Select"; admonition includes current-assignee notification clause matching the assignee how-tos.

  • http://localhost:8000/anomalies/how-tos/tags/remove-tags/ — Lead now includes API link; admonition includes current-assignee notification clause.

  • http://localhost:8000/anomalies/how-tos/tags/bulk-edit/ — Step 11 mentions in-app notification for current assignees of each anomaly.

  • Legacy redirects still resolve: /anomalies/status/, /anomalies/types/, /anomalies/fingerprints/, /anomalies/details/insights/, /anomalies/details/source-record/, and /anomalies/manage-anomalies/<page>/ should all land on their new deep-dive/ or how-tos/ URLs.

@RafaelOsiro RafaelOsiro self-assigned this May 18, 2026
@RafaelOsiro RafaelOsiro added the documentation Improvements or additions to documentation label May 18, 2026
@RafaelOsiro RafaelOsiro marked this pull request as draft May 18, 2026 21:18
- Remove em-dashes across anomaly docs (status, source-record, insights,
  detection, overview, fingerprints).
- Fix tag-edit permission in edit-tags how-to: Editor -> Author, aligning
  with the backend (PUT /api/anomalies/{id} requires Author baseline;
  only description additionally requires Editor).
- Add cross-link hub pointer in edit-description so legacy edit-anomalies
  arrivals find edit-tags and add-assignee.
- Flatten redundant ../deep-dive/assignees.md self-reference in insights.
- Add 6 missing legacy redirects (anomalies-in-datastore, anomaly-details,
  manage-anomalies, overview-of-an-anomaly, universal-anomaly,
  what-is-anomaly) so external links keep resolving.
@RafaelOsiro RafaelOsiro force-pushed the qua-1756-anomaly-assignees branch from e423a82 to 27da3a6 Compare May 22, 2026 21:00
- Normalize team permission terminology ("<level> team permission")
  across Deep Dive assignees, add/remove/bulk how-tos, API, and FAQ.
- Fix factually wrong hard-delete constraint in API: hard-delete
  works on any anomaly, not just archived (validated against
  controlplane).
- Refine Deep Dive assignee descriptions: avatar/name display rules,
  inheritance from check defaults, notification triggers (status,
  tags, description, assignees), and Author requirement on
  self-assignment.
- Drop redundant H2s and "picker component" leak in add/remove/bulk
  how-tos; replace with "user picker" wording.
- Standardize tab labels to "From Explore > Anomalies" and "From the
  Anomaly Overview" in how-tos.
- Treat the close icon in the user picker as an icon (not a button)
  in remove-assignee how-to.
- Split anomalies/how-tos/edit-tags.md into three sibling pages under
  anomalies/how-tos/tags/: add-tags.md (Overview/Explore tabs),
  remove-tags.md (Overview/Explore tabs, screenshots TBD), and
  bulk-edit.md (Datastore/Check Template tabs).
- Mirror the Assignee how-to architecture: same tabs, same step pattern,
  parallel naming ("Tags field", clean +/Edit icon phrasing).
- Add mkdocs.yml nav entry "Tags" replacing the flat "Edit Tags", and
  redirect anomalies/how-tos/edit-tags.md to tags/add-tags.md.
- Create docs/assets/anomalies/how-tos/shared/ for the first 6 steps of
  the bulk flow (anomalies list to modal opens), reused by both
  bulk-assign.md and bulk-edit.md.
- Move bulk-assign steps 1-6 (datastore + check-template) into shared/;
  keep steps 7-11 inside assignee/bulk-assign/.
- Place bulk-edit-specific assets (datastore + check-template steps
  7-11) inside tags/bulk-edit/ following the standard
  <context>-step-N-<descriptor>.png naming.
- Update cross-links in faq.md, edit-description.md, and the bulk-assign
  tip to point at the new Tags pages.
- Remove the now-stale Assign Tags section from explore/anomalies.md
  and drop the associated assign-light.png and tag-light.png assets.
- Delete the legacy edit-tags-bulk/ asset folder (content migrated).
- Strip screenshots from anomalies/deep-dive/status.md and keep it
  conceptual: H1 icon (mdi-alert matching the frontend
  icon-anomalies.svg), Status colors reference table sourced from
  frontend (consts/anomalies.ts + quasar.variables.scss), and
  Open/Archived sub-status reference tables with "Anomaly Status"
  column.
- Create anomalies/how-tos/filter-by-status.md as a new how-to with
  two sections (Open + Archived), each with three tabs (Explore,
  Datastore Anomalies tab, Check Template Anomalies tab) and two
  steps per tab (click filter, pick sub-status). Each tab carries
  its sub-status reference table for quick lookup.
- Place the 12 captured screenshots under
  docs/assets/anomalies/how-tos/filter-by-status/ following the
  <context>-<group>-step-N-<descriptor>.png pattern. Mark Container
  Level and Field Level views as TODO for future capture.
- Delete the legacy Deep Dive screenshots
  (deep-dive/status/{open,archive}-anomalies.png) now that the
  page is screenshot-free.
- Add Filter by Status to the How-tos nav before Filter & Sort.
- Move Sort By and Fields content from insights.md to source-record.md
  as two new H2 sections placed between Source Record Visualization and
  Force Refresh. Refresh and Download already lived in source-record.md;
  only adjusted the image paths that were still pointing at
  ../insights/.
- Replace the full ## Source Records block in insights.md (~65 lines)
  with a short pointer paragraph that links to source-record.md, so
  insights.md stays focused on the Insights view.
- Reorganize docs/assets/anomalies/deep-dive/source-record/ to follow
  the userguide section-prefix naming pattern used in insights/:
    - shape-anomaly-highlight.png, record-anomaly-highlight.png
      (intro examples)
    - sort-by.png, sort-by-options.png (Sort By section)
    - fields-*.png (Fields section: button, dropdown, only-anomalous,
      hide-all, show-all, show-all-unchecked)
    - force-refresh.png, download.png (Force Refresh / Download
      sections)
    - comparison.png (was is-replica.png, aligns with the section name
      Comparison Source Records)
    - masked-fields-*.png and visualization.png kept as-is.
- Update all 18 image refs in source-record.md and their alt texts to
  match the new filenames.
- Delete the orphan docs/assets/anomalies/deep-dive/insights/source-records.png
  left behind by the section removal.
- Create docs/anomalies/deep-dive/description.md covering how the
  default description is built from failed-check messages, who can
  edit (Editor team permission), Agent Q AI-suggested descriptions
  (Use / Regenerate / Dismiss flow), masked-field handling, the
  archived-anomaly read-only state, History tracking, and a
  Permissions summary table.
- Replace the ## Description block in insights.md with a short
  pointer paragraph so insights.md stays focused on the Insights
  view layout.
- Add Description to the Deep Dive nav, placed right after Insights.
- Page validates against the published UI behavior: Save is disabled
  when the description is empty or whitespace, Edit/Suggest buttons
  hide on archived anomalies and for users without Editor permission,
  and the description renders as plain text with preserved line
  breaks (no Markdown rendering today).
- Add the "From the Container Anomalies tab" tab to both Open and
  Archived sections of filter-by-status.md, with 4 new screenshots
  (container-open-step-1-click-filter, container-open-step-2-view-
  statuses, container-archived-step-1-click-filter, container-
  archived-step-2-view-statuses). Update the trailing TODO comment
  to flag only Field Level as pending.
- Restructure filter-and-sort.md around the same entry-point tabs as
  the other anomaly how-tos (Explore, Datastore, Check Template,
  Container). Each tab carries its own Sort image + sort table and
  Filter image + filter table. The previous one-flow structure with
  filter-1.png / filter-2.png is replaced by 8 context-specific
  screenshots (explore-sort, explore-filter, datastore-sort,
  datastore-filter, check-template-sort, check-template-filter,
  container-sort, container-filter).
- Replace the shared FUZZY-SEARCH include-markdown on filter-and-sort
  with an explicit "Fuzzy search" tip that names the behavior and
  gives a concrete example (typing "dat" matches "Customer Data").
  Validated against frontend filters.vue useFuzzyFilter usage on
  Datastores, Rules, Containers, Fields, Checks, Tags, and Assignees.
- Drop the now-orphan sort-options.png, sort-order.png, filter-1.png,
  filter-2.png, and fuzzy-anomalies.png; keep the commented-out
  "Filter by Assignee" / "Assigned subtab" block at the bottom for
  the future restructure.
- Leave a trailing TODO comment on filter-and-sort.md flagging Field
  Level capture as pending, mirroring filter-by-status.md.
- Add 12 screenshots to docs/assets/anomalies/how-tos/tags/remove-tags/
  covering the Remove Tags flow from both entry points (6 Overview +
  6 Explore). Filenames follow the Add Tags sister-page pattern with
  the descriptive suffixes adapted to the remove flow: tags-field,
  edit-button, tag-picker, remove-tag, tag-unmarked, updated-field.
- Replace the 12 placeholder `<!-- TODO: screenshot ... -->` markers in
  remove-tags.md with real `![alt](path)` references that point at
  the new files.
Factual corrections validated against frontend and dataplane:
- status.md: rewrite Duplicate vs Discarded info admonition to match
  scan re-opening behavior; drop "All" pseudo-status rows from
  Open/Archived sub-status tables.
- source-record.md: correct "Weight" sort label to "Importance" and
  align setting name with the UI ("Maximum Source Examples per
  Anomaly"). Add TODO at top flagging future split of how-to content
  out of this Deep Dive (memory exception registered).

Structure:
- filter-and-sort.md: split into Sort options + Filter options H2s with
  shared canonical tables outside per-entry-point tabs (drops ~80 lines
  of duplication).

Editorial polish across the family:
- Permission terminology (Editor team permission, Admin role).
- Header normalization in sub-status tables.
- Notification clause parity across add/remove/bulk tag how-tos.
- Grammar, bold formatting, 250 MB spacing, "Show audit log" lowercase
  match with the UI tooltip.
@RafaelOsiro RafaelOsiro marked this pull request as ready for review June 3, 2026 02:18

@ets ets left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. No greptile score on this one, so I reviewed manually: internal links across all 29 changed files resolve, all mkdocs.yml nav entries and the ~350 redirect_map targets resolve to existing files, image references resolve, and include-markdown/code-fence/admonition syntax is well-formed. The only dangling image references are intentionally inside HTML comment blocks (TODO placeholders for a follow-up branch), so they're inert. Looks good.


Generated by Claude Code

Resolve conflict in in-app-notifications.md by accepting the deletion
from main, where the page was split into introduction/how-tos/faq/api
pages. Repoint two cross-links that previously pointed to anchors on
the old single page (#assignment, #mention) at the new introduction
page's 'What Triggers a Notification' section.
@RafaelOsiro

Copy link
Copy Markdown
Contributor Author

@greptileai

@greptile-apps

greptile-apps Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR restructures the Anomalies documentation into Deep Dive and How-tos hubs and introduces end-to-end documentation for the new Assignees feature, including a deep-dive, three how-tos (Add / Remove / Bulk-Assign), an Anomalies API reference, and a new FAQ. All legacy URL paths are covered by redirects in mkdocs.yml.

  • New Assignees content (deep-dive/assignees.md, how-tos/assignee/*) documents field behavior, inheritance from originating checks, permissions, notification rules, history tracking, and the Owner/Default Assignee/Assignees concept comparison. The bulk-assign and remove how-tos correctly describe the replace-semantics and notification behavior.
  • Anomalies API reference (api.md) is comprehensive and resolves the previously flagged ambiguity about archived-anomaly restore by explicitly stating that PUT with "status": "Acknowledged" returns an archived anomaly to Acknowledged (not Active).
  • "Viewer role" terminology in deep-dive/assignees.md (lines 7 and 29) and how-tos/assignee/add-assignee.md (Step 3 in both tabs) uses "Viewer role" instead of "Viewer team permission" — inconsistent with every other page in this same PR and factually incorrect in the Qualytics permission model where Viewer is a team permission, not a platform role.

Confidence Score: 4/5

Safe to merge with minor fixes — three instances of incorrect permission terminology in the new Assignees deep-dive and add-assignee how-to should be corrected before the pages go live to avoid confusing administrators.

The new Assignees documentation uses "Viewer role" in deep-dive/assignees.md lines 7 and 29, and in both Step 3 variants of how-tos/assignee/add-assignee.md. In Qualytics, Viewer is a team permission — platform roles are Member, Manager, and Admin. Every other page in this same PR (api.md, bulk-assign.md, faq.md) correctly says "Viewer team permission." An admin who reads only the assignees deep-dive or add-assignee how-to could look for a non-existent "Viewer" platform role when configuring datastore access.

docs/anomalies/deep-dive/assignees.md (lines 7, 29) and docs/anomalies/how-tos/assignee/add-assignee.md (Step 3 in both tabs)

Important Files Changed

Filename Overview
docs/anomalies/deep-dive/assignees.md New deep-dive for Assignees field — content is thorough (field behavior, inheritance, permissions table, notifications, history, concept comparison table, filtering) but uses "Viewer role" instead of "Viewer team permission" in two places, inconsistent with the rest of the PR.
docs/anomalies/how-tos/assignee/add-assignee.md New add-assignee how-to with two-tab layout — same "Viewer role" terminology error appears in both Step 3 variants; the rest of the content and cross-links are correct.
docs/anomalies/how-tos/assignee/remove-assignee.md New remove-assignee how-to — two-tab layout, correct X-button labeling, self-unassignment note, and notification callout all accurate.
docs/anomalies/how-tos/assignee/bulk-assign.md New bulk-assign how-to — uses "Viewer team permission" correctly, replace-semantics warning is present, in-modal overwrite notice documented in Step 6.
docs/anomalies/api.md New Anomalies API reference — schema, list/retrieve, update (single + bulk), assignee management subsection, archive/delete, history, source records, and ticket endpoints all documented with consistent "Author team permission" terminology. The status field note now explicitly documents archived→Acknowledged restore behavior, addressing the previously flagged ambiguity.
docs/anomalies/faq.md New FAQ — Active↔Acknowledged reversibility answer is correct and consistent with api.md's updated restore description; Assignees section is comprehensive; "Viewer team permission" used correctly throughout.
docs/explore/anomalies.md Assigned subtab and Assignees filter documented; pre-existing warning at line 100 ("once acknowledged, never reverts to active") still contradicts faq.md — flagged in a prior review round, not newly introduced by this PR.
mkdocs.yml Nav restructured into Deep Dive / How-tos hubs; legacy redirects added for every moved page including anomalies/types.md, anomalies/status.md, anomalies/fingerprints.md, and all manage-anomalies/* paths.
docs/anomalies/how-tos/filter-and-sort.md Restructured into Sort/Filter H2s; filter table row 8 adds Assignees filter; Filter-by-Assignee and Assigned-subtab how-to sections correctly left in an HTML comment pending screenshots.
docs/anomalies/deep-dive/description.md New description deep-dive — uses "Editor team permission" consistently; AI-suggested description and masked fields sections look accurate.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Anomaly Created by Scan] --> B{Check has Default\nAnomaly Assignee?}
    B -- Yes --> C[Auto-assign user\nat creation — silent]
    B -- No --> D[No assignees]
    C --> E[Anomaly: Open / Active]
    D --> E

    E --> F{Author edits\nassignees / tags /\ndescription / status}
    F --> G[Platform notifies\ncurrent assignees\nexcept the editor]

    E --> H[Bulk-Assign via\nBulk Edit modal]
    H -- Replaces existing set --> E

    E --> I[Archive via\nDELETE endpoint]
    I --> J[Archived — read-only\nAssignees locked]

    J --> K[Restore via PUT\nstatus: Acknowledged]
    K --> L[Open / Acknowledged\nAssignees editable again]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[Anomaly Created by Scan] --> B{Check has Default\nAnomaly Assignee?}
    B -- Yes --> C[Auto-assign user\nat creation — silent]
    B -- No --> D[No assignees]
    C --> E[Anomaly: Open / Active]
    D --> E

    E --> F{Author edits\nassignees / tags /\ndescription / status}
    F --> G[Platform notifies\ncurrent assignees\nexcept the editor]

    E --> H[Bulk-Assign via\nBulk Edit modal]
    H -- Replaces existing set --> E

    E --> I[Archive via\nDELETE endpoint]
    I --> J[Archived — read-only\nAssignees locked]

    J --> K[Restore via PUT\nstatus: Acknowledged]
    K --> L[Open / Acknowledged\nAssignees editable again]
Loading

Reviews (2): Last reviewed commit: "docs(anomalies): apply Greptile review f..." | Re-trigger Greptile

Comment thread mkdocs.yml
Comment thread docs/anomalies/faq.md
- edit-description.md: expand the cross-link into a tip admonition that
  covers Add/Remove/Bulk for both tags and assignees, so users hitting
  the legacy edit-anomalies redirect find the full edit surface.
- api.md: document that PUT with status "Acknowledged" on an archived
  anomaly restores it (matching the FAQ wording and crud.anomaly.update
  behavior).
@RafaelOsiro

Copy link
Copy Markdown
Contributor Author

@greptileai review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants