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

🌟 What is the purpose of this PR?

Top of the Notebook view stack, stacked on #9408: the user guide page for the new view, its registration with the in-app AI assistant, and the stack's patch changeset.

🔗 Related links

🔍 What does this change?

  • Adds docs/notebook-view.md (cells, keyboard and search, badges, ordering, the graph explorer, limits) and links it from the docs index and the visual settings page.
  • Registers the page in petrinautDocNames / petrinautDocSummaries and the raw docs content map, so the AI assistant can read it; the existing tests enforce all three stay in sync.
  • Records one patch changeset for @hashintel/petrinaut and @hashintel/petrinaut-core, covering the whole stack.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • modifies an npm-publishable library and I have added a changeset file(s)

📜 Does this require a change to the docs?

The changes in this PR:

  • require changes to docs which are made as part of this PR

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph

⚠️ Known issues

  • The docs page has no screenshots yet; candidates to be added before the stack merges.

🛡 What tests cover this?

ai.test.ts and petrinaut-docs-content.test.ts fail if the page is missing from the name enum, the summaries, or the content map.

❓ How to test this?

  1. Open the AI assistant in the notebook view and ask about the Notebook — the assistant should cite the new page.
  2. Read libs/@hashintel/petrinaut/docs/notebook-view.md against the running view.

@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 (UTC)
hash Ready Ready Preview Aug 30, 2026 2:04pm
petrinaut Ready Ready Preview Aug 30, 2026 2:04pm
petrinaut-docs Ready Ready Preview Aug 30, 2026 2:04pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hashdotdesign-tokens Ignored Ignored Preview Aug 30, 2026 2:04pm

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 August 30, 2026 13:55
…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