Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog.d/285.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
section: fixes
---

- **Graph block trays use the stage colour** (#285). The tray drawn around a block of graph cards (#272) used to be filled with the inset surface colour, so a graph whose block reached the side of a fitted view failed the `stage-surface` renderer check. It is now filled with the stage colour and distinguished by its border and by hiding the dot grid inside it.
12 changes: 6 additions & 6 deletions docs/guides/renderer-kit-graphs.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ baseline.
relationship, they wrap into a block instead of stretching their layer into one
long row. Sharing every relationship means having the same sources and targets,
of the same kinds, drawn the same way (`LayoutEdge.bundle`). ELK places the
block as a single node. Its cards fill lines in reading order inside an inset
tray about three times as broad as it is deep; in a top-to-bottom graph, the
cards sit on the column grid. One route runs from each source into the tray,
entering directly across from the source where possible, and one route runs from
the tray to each target. Each relationship keeps its own link on the shared
route so it can still be selected and marked. Links into or out of a tray carry
block as a single node. Its cards fill lines in reading order inside a tray
about three times as broad as it is deep; in a top-to-bottom graph, the cards
sit on the column grid. One route runs from each source into the tray, entering
directly across from the source where possible, and one route runs from the tray
to each target. Each relationship keeps its own link on the shared route so it
can still be selected and marked. Links into or out of a tray carry
`data-to-block` or `data-from-block`. The canvas draws each tray under its cards
with a caption that counts the cards and, while changes are emphasized, shows
how many each change touches (`11 tools +11`). `GraphLayout.blocks` lists each
Expand Down
29 changes: 21 additions & 8 deletions packages/renderers/graph/fixtures/make-mcp-tools.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
// Regenerates `mcp-tools-before.json` and `mcp-tools-after.json`: the GitHub MCP Server's tools, the toolsets that
// contain them and the OAuth scopes each may ask for, as its `list-scopes --toolsets=all` command reports them (tool
// names, toolsets and scopes are public, in github/github-mcp-server). The after revision adds the
// `copilot_automations` toolset and its 11 tools, every one requiring `repo`: a wide fan-out from one toolset into one
// scope among about 140 unchanged tools, 22 more toolsets and 12 scopes.
// Regenerates the GitHub MCP Server's tools, the toolsets that contain them and the OAuth scopes each may ask for, as
// its `list-scopes --toolsets=all` command reports them (tool names, toolsets and scopes are public, in
// github/github-mcp-server). The after revision adds the `copilot_automations` toolset and its 11 tools, every one
// requiring `repo`: a wide fan-out from one toolset into one scope among unchanged tools.
//
// - `mcp-tools-full-before.json` and `-after.json`: the whole inventory, about 140 unchanged tools in 22 more toolsets
// and 12 scopes, for the kit's layout performance tests.
// - `mcp-tools-before.json` and `-after.json`: the `graph/mcp-tools` scenario, the arrival among eight of those
// toolsets (`scenarioToolsets`). Every browser suite lays each scenario out many times, in every engine, so it stays
// the size of the other graph scenarios: the whole inventory's checks outlast their time on CI runners.
//
// node packages/renderers/graph/fixtures/make-mcp-tools.mjs
import {writeFileSync} from 'node:fs'
Expand Down Expand Up @@ -214,14 +219,20 @@ const toolsets = {

const added = 'copilot_automations'

function extraction(withAdded) {
/**
* The toolsets the scenario keeps besides the arrival: some whose tools require `repo` beside it, and some with other
* scopes (one, `notifications`, a block of its own).
*/
const scenarioToolsets = new Set([added, 'actions', 'code_security', 'context', 'copilot', 'dependabot', 'gists', 'labels', 'notifications'])

function extraction(withAdded, kept = () => true) {
const entities = []
const relationships = []
const scopes = new Set()
// A tool in two toolsets (`get_label`) is one tool that both contain.
const seen = new Set()
for (const [toolset, tools] of Object.entries(toolsets)) {
if (toolset === added && !withAdded) continue
if ((toolset === added && !withAdded) || !kept(toolset)) continue
entities.push({id: `toolset:${toolset}`, kind: 'toolset', label: toolset})
for (const line of tools) {
const [name, access, listed = 'repo'] = line.split(' ')
Expand All @@ -243,5 +254,7 @@ for (const [name, withAdded] of [
['before', false],
['after', true],
]) {
writeFileSync(path.join(here, `mcp-tools-${name}.json`), `${JSON.stringify(extraction(withAdded), null, 2)}\n`)
writeFileSync(path.join(here, `mcp-tools-full-${name}.json`), `${JSON.stringify(extraction(withAdded), null, 2)}\n`)
const scenario = extraction(withAdded, toolset => scenarioToolsets.has(toolset))
writeFileSync(path.join(here, `mcp-tools-${name}.json`), `${JSON.stringify(scenario, null, 2)}\n`)
}
Loading
Loading