Skip to content

FE-1509: Document the Notebook view and register it with the AI assistant - #9351

Draft
kube wants to merge 4 commits into
claude/fe-1509-notebook-analyses-uifrom
claude/fe-1509-notebook-view
Draft

FE-1509: Document the Notebook view and register it with the AI assistant#9351
kube wants to merge 4 commits into
claude/fe-1509-notebook-analyses-uifrom
claude/fe-1509-notebook-view

Conversation

@kube

@kube kube commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Important

User guide, AI-assistant registration, and the stack's changeset.

Summary

Before this PR, the Notebook view ships undocumented. The in-app AI assistant reads the user guide at runtime through its docs tool, so a missing page means the assistant cannot answer questions about the view at all.

Adds the Notebook View guide page covering cells, in-place editing, keyboard flow, badges, and the graph explorer, links it from the guide index, and registers it with the assistant's docs tool. Carries the stack's one patch changeset.

Links

Changes

  • New notebook-view.md user guide page

    Cells and their summaries, per-cell keyboard navigation, in-place editing, the badges, search and ordering, dependency lines, and the graph explorer.

  • Guide index gains the page and a fourth mode bullet

    Visual settings page documents the Notebook view toggle.

  • Page registered with the AI assistant's docs tool

    Name, summary and raw content entry; the ai.test.ts and petrinaut-docs-content.test.ts suites enforce all three stay in step.

  • One patch changeset for the notebook feature

Test coverage

  • ai.test.ts, petrinaut-docs-content.test.ts:

    Every registered doc name has a summary and a content entry.

How to test

  • Open Petrinaut preview on Vercel
  • Viewport controls > Settings > Notebook view
  • Top bar > Notebook
  • Compare behaviour against the guide page
  • AI assistant > ask how to use the Notebook view
  • Expect an answer grounded in the page

@kube kube self-assigned this Aug 26, 2026
@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hash Ready Ready Preview Sep 3, 2026 11:44pm UTC
petrinaut Ready Ready Preview Sep 3, 2026 11:44pm UTC
petrinaut-docs Ready Ready Preview Sep 3, 2026 11:44pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
hashdotdesign-tokens Ignored Ignored Preview Sep 3, 2026 11:44pm UTC

Request Review

@github-actions github-actions Bot added area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team labels Aug 26, 2026
@semgrep-code-hashintel

Copy link
Copy Markdown

Semgrep found 2 detect-non-literal-regexp findings:

RegExp() called with a variableName function argument, this might allow an attacker to cause a Regular Expression Denial-of-Service (ReDoS) within your application as RegExP blocks the main thread. For this reason, it is recommended to use hardcoded regexes instead. If your regex is run on user-controlled input, consider performing input validation or use a regex checking/sanitization library such as https://www.npmjs.com/package/recheck to verify that the regex does not appear vulnerable to ReDoS.

View Dataflow Graph
flowchart LR
    classDef invis fill:white, stroke: none
    classDef default fill:#e7f5ff, color:#1c7fd6, stroke: none

    subgraph File0["<b>libs/@hashintel/petrinaut/src/ui/views/Notebook/notebook-model.ts</b>"]
        direction LR
        %% Source

        subgraph Source
            direction LR

            v0["<a href=https://github.com/hashintel/hash/blob/37624eb2e9bcfe0d83be67cd886a346f2019f70f/libs/@hashintel/petrinaut/src/ui/views/Notebook/notebook-model.ts#L191 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 191] variableName</a>"]
        end
        %% Intermediate

        subgraph Traces0[Traces]
            direction TB

            v2["<a href=https://github.com/hashintel/hash/blob/37624eb2e9bcfe0d83be67cd886a346f2019f70f/libs/@hashintel/petrinaut/src/ui/views/Notebook/notebook-model.ts#L191 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 191] variableName</a>"]

            v3["<a href=https://github.com/hashintel/hash/blob/37624eb2e9bcfe0d83be67cd886a346f2019f70f/libs/@hashintel/petrinaut/src/ui/views/Notebook/notebook-model.ts#L196 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 196] escapeRegExp</a>"]

            v4["<a href=https://github.com/hashintel/hash/blob/37624eb2e9bcfe0d83be67cd886a346f2019f70f/libs/@hashintel/petrinaut/src/ui/views/Notebook/notebook-model.ts#L184 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 184] value</a>"]

            v5["<a href=https://github.com/hashintel/hash/blob/37624eb2e9bcfe0d83be67cd886a346f2019f70f/libs/@hashintel/petrinaut/src/ui/views/Notebook/notebook-model.ts#L196 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 196] `</a>"]
        end
            v2 --> v3
            v3 --> v4
            v4 --> v5
        %% Sink

        subgraph Sink
            direction LR

            v1["<a href=https://github.com/hashintel/hash/blob/37624eb2e9bcfe0d83be67cd886a346f2019f70f/libs/@hashintel/petrinaut/src/ui/views/Notebook/notebook-model.ts#L196 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 196] new RegExp(`\\b${escapeRegExp(variableName)}\\b`, &quot;u&quot;)</a>"]
        end
    end
    %% Class Assignment
    Source:::invis
    Sink:::invis

    Traces0:::invis
    File0:::invis

    %% Connections

    Source --> Traces0
    Traces0 --> Sink

Loading

Semgrep found 1 regex_dos finding:

  • libs/@hashintel/petrinaut/src/ui/views/Notebook/notebook-model.ts

Ensure that the regex used to compare with user supplied input is safe from regular expression denial of service.

@kube
kube changed the base branch from main to claude/fe-1509-notebook-explorer August 28, 2026 14:49
@kube
kube force-pushed the claude/fe-1509-notebook-view branch from 37624eb to 865d012 Compare August 28, 2026 14:49
@kube kube changed the title FE-1509: Add an experimental read-only Notebook view FE-1509: Document the Notebook view and register it with the AI assistant Aug 28, 2026
@kube
kube force-pushed the claude/fe-1509-notebook-view branch from 865d012 to f5c8164 Compare August 28, 2026 18:34
@kube
kube force-pushed the claude/fe-1509-notebook-view branch from f5c8164 to 65d6ce8 Compare August 28, 2026 18:44
@kube
kube force-pushed the claude/fe-1509-notebook-view branch from 65d6ce8 to e67c788 Compare August 28, 2026 19:13
@kube
kube force-pushed the claude/fe-1509-notebook-view branch from 0e2a3a6 to 9000c22 Compare August 29, 2026 01:38
@kube
kube changed the base branch from claude/fe-1509-notebook-explorer to claude/fe-1509-notebook-analyses-ui August 29, 2026 02:14
@kube
kube force-pushed the claude/fe-1509-notebook-view branch from 9000c22 to 75587ff Compare August 29, 2026 02:14
@kube
kube force-pushed the claude/fe-1509-notebook-view branch from 75587ff to bf4c951 Compare August 29, 2026 14:09
@kube
kube force-pushed the claude/fe-1509-notebook-view branch from bf4c951 to 96688b0 Compare August 30, 2026 04:54
@kube
kube force-pushed the claude/fe-1509-notebook-view branch from 96688b0 to bfc27e0 Compare August 30, 2026 13:07
kube added 4 commits September 4, 2026 00:37
…tant

Adds the notebook-view user guide page, links it from the docs index
and the visual settings page, registers it in petrinautDocNames /
petrinautDocSummaries and the raw docs content map, and records one
patch changeset for the whole stack.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

1 participant