Skip to content

Commit 6e004ca

Browse files
authored
feat!: fix the 1.0 readiness review findings and settle the agent API (#433)
Fixes every blocker and major finding from the 1.0 readiness review: one-time code guess limits and per-project token storage, collectors kept out of the Angular zone, refused writes marked as errors, one default-page rule, correct inspector data, panel contrast and screen reader fixes, docs corrections, a tag-driven release workflow and e2e checks in CI. Agent tools, their arguments and answers are renamed to one scheme with plain text answers, each entry point exports only its documented API, and the Angular and Node ranges match what is tested. The 1.0.0 changelog lists every upgrade step. The version is not bumped. Fixes #430 Fixes #424 BREAKING CHANGE: agent tools, their arguments and the per-page resource templates are renamed, answers are plain text, entry points export less, and the Angular and Node ranges changed. See the 1.0.0 changelog.
1 parent 5a09545 commit 6e004ca

405 files changed

Lines changed: 12434 additions & 3824 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.claude/skills/devtools-docs/SKILL.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Raw HTML in markdown. Always write explicit closing tags; never self-close custo
9494
| `ngmd-workflow` > `ngmd-step` | Ordered steps. | step `title` |
9595
| `ngmd-accordion` > `ngmd-accordion-item` | FAQ. | item `title`, `open` |
9696
| `ngmd-pill-row` > `ngmd-pill` | Related links at the end of a page. | pill `href`, `title` |
97-
| `ngmd-badge` | Status chip next to a heading. | `variant`: new, updated, alpha, beta, stable, deprecated |
97+
| `ngmd-badge` | Status chip next to a heading. | `variant`: new, updated, alpha, beta, stable, deprecated, action, destructive |
9898
| `ngmd-tabs` > `ngmd-tab` | Alternatives a code group can't express. | tab `title`, `icon`, `image` |
9999
| `ngmd-image`, `ngmd-video` | Screenshots, YouTube or Vimeo. | image `src`, `alt`, `caption`, `width`. video `src`, `title` |
100100

@@ -114,6 +114,7 @@ Rules:
114114
## 6. Code samples
115115

116116
- Always set the language. Put the file path in a comment on the first line: `// src/app/app.config.ts`.
117+
- JSON samples get no path comment: JSON has no comments and the copy button copies the whole block. Name the file in the sentence above the sample instead.
117118
- Highlight lines with `{3}` or `{2,5-7}` after the language. Count the path comment as line 1.
118119
- Install commands use a code group: ` ```bash group="install" name="pnpm" active ` then npm, yarn, bun.
119120
- `file="path#L5-L20"` imports a real file (relative to `apps/docs`, nothing outside it). It is not a title.

‎.gitattributes‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
*.zip binary
66
extension/ui/** linguist-generated=true
77
pnpm-lock.yaml linguist-generated=true
8+
extension/ui/THIRD_PARTY_LICENSES.md -text

‎.github/workflows/ci.yml‎

Lines changed: 89 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ jobs:
2929

3030
- uses: nrwl/nx-set-shas@v4
3131

32-
- uses: nrwl/nx-set-shas@v4
33-
3432
- name: Check formatting
3533
run: pnpm format:check
3634

@@ -66,7 +64,7 @@ jobs:
6664

6765
node-22:
6866
name: Package tests on Node.js 22
69-
# `engines.node` allows 22, while the build job runs the `.nvmrc` version.
67+
# `engines.node` allows 22.12 and later, while the build job runs the `.nvmrc` version.
7068
runs-on: ubuntu-latest
7169
timeout-minutes: 15
7270
steps:
@@ -96,3 +94,91 @@ jobs:
9694

9795
- name: Check the panel with axe
9896
run: pnpm test:axe
97+
98+
# The e2e jobs below are slow, so they run only when the package, the panel, the SSR demo, the
99+
# tools docs (e2e:mcp reads them) or the scripts and fixtures they use change. A diff that cannot
100+
# be computed (a new branch, a force push) runs them.
101+
changes:
102+
name: Changed paths
103+
runs-on: ubuntu-latest
104+
timeout-minutes: 5
105+
outputs:
106+
e2e: ${{ steps.diff.outputs.e2e }}
107+
steps:
108+
- uses: actions/checkout@v7
109+
with:
110+
fetch-depth: 0
111+
persist-credentials: false
112+
113+
- id: diff
114+
env:
115+
BASE: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
116+
run: |
117+
paths=(packages/devtools app e2e src apps/docs/src/content/agents angular.json package.json
118+
scripts/e2e-security.mjs scripts/e2e-mcp.mjs pnpm-lock.yaml .github/workflows/ci.yml)
119+
if git diff --quiet "$BASE" HEAD -- "${paths[@]}"; then
120+
echo "e2e=false" >> "$GITHUB_OUTPUT"
121+
else
122+
echo "e2e=true" >> "$GITHUB_OUTPUT"
123+
fi
124+
125+
e2e-security:
126+
name: Security e2e
127+
needs: changes
128+
if: needs.changes.outputs.e2e == 'true'
129+
runs-on: ubuntu-latest
130+
timeout-minutes: 30
131+
steps:
132+
- uses: actions/checkout@v7
133+
with:
134+
persist-credentials: false
135+
136+
- uses: ./.github/actions/setup
137+
138+
# Playwright's own Chromium, as the axe job installs it.
139+
- name: Install Chromium
140+
run: pnpm exec playwright install --with-deps chromium
141+
142+
- name: Build the package
143+
run: pnpm devtools:build-pkg
144+
145+
# Leak corpus, access gates and a production build, on ports 5231 to 5236.
146+
- name: Check redaction and access
147+
run: pnpm e2e:security
148+
149+
- name: Keep the captured channels
150+
if: failure()
151+
uses: actions/upload-artifact@v4
152+
with:
153+
name: e2e-security
154+
path: dist/e2e-security
155+
if-no-files-found: ignore
156+
157+
e2e-mcp:
158+
name: MCP e2e
159+
needs: changes
160+
if: needs.changes.outputs.e2e == 'true'
161+
runs-on: ubuntu-latest
162+
timeout-minutes: 30
163+
steps:
164+
- uses: actions/checkout@v7
165+
with:
166+
persist-credentials: false
167+
168+
- uses: ./.github/actions/setup
169+
170+
- name: Install Chromium
171+
run: pnpm exec playwright install --with-deps chromium
172+
173+
# Builds the package and the SSR demo itself, then serves the demo on port 5150 (the variant
174+
# hubs on 5151 to 5154) and checks every tool, resource and prompt, and agents/tools.md.
175+
- name: Check the agent surface
176+
run: pnpm e2e:mcp --report dist/e2e-mcp/report.json
177+
178+
- name: Keep the report
179+
if: always()
180+
uses: actions/upload-artifact@v4
181+
with:
182+
name: e2e-mcp
183+
path: dist/e2e-mcp
184+
if-no-files-found: ignore

‎.github/workflows/e2e.yml‎

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
name: E2E
2+
3+
# The slow end-to-end checks that do not fit a pull request: every panel view in a real browser,
4+
# multi-tab and lifecycle resilience, and the install matrix from a packed tarball. Pull requests
5+
# run the security and MCP checks (ci.yml), and the release runs a slice of the install matrix on
6+
# the tarball it publishes (release.yml). See apps/docs/src/content/contributing/development.md.
7+
on:
8+
schedule:
9+
# Mondays at 07:00 UTC, an hour after latest.yml and compat.yml.
10+
- cron: '0 7 * * 1'
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
16+
concurrency:
17+
group: ${{ github.workflow }}
18+
cancel-in-progress: false
19+
20+
jobs:
21+
panel:
22+
name: Panel views
23+
runs-on: ubuntu-latest
24+
timeout-minutes: 45
25+
steps:
26+
- uses: actions/checkout@v7
27+
with:
28+
persist-credentials: false
29+
30+
- uses: ./.github/actions/setup
31+
32+
- name: Install Chromium
33+
run: pnpm exec playwright install --with-deps chromium
34+
35+
# The SSR demo serves the panel built into packages/devtools/dist/public.
36+
- name: Build the package and the demo
37+
run: |
38+
pnpm devtools:build-pkg
39+
pnpm build --configuration development
40+
41+
# The demo keeps the one-time code on unless PANGULAR_AUTH is false, and the panel check
42+
# needs a connected panel.
43+
- name: Start the SSR demo on port 4000
44+
run: |
45+
PANGULAR_AUTH=false PORT=4000 node dist/pangular-inspector/server/server.mjs > "$RUNNER_TEMP/demo.log" 2>&1 &
46+
for _ in $(seq 60); do
47+
curl -sf http://localhost:4000/ > /dev/null && exit 0
48+
sleep 1
49+
done
50+
cat "$RUNNER_TEMP/demo.log"
51+
exit 1
52+
53+
# Every tab and sub-view, dark and light, at 1280 and 360 px: axe, overflow and page errors.
54+
- name: Check every panel view
55+
run: pnpm e2e:panel --base http://localhost:4000 --out dist/e2e-panel
56+
57+
- name: Keep the screenshots and results
58+
if: always()
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: e2e-panel
62+
path: dist/e2e-panel
63+
if-no-files-found: ignore
64+
65+
resilience:
66+
name: Resilience
67+
runs-on: ubuntu-latest
68+
timeout-minutes: 60
69+
steps:
70+
- uses: actions/checkout@v7
71+
with:
72+
persist-credentials: false
73+
74+
- uses: ./.github/actions/setup
75+
76+
- name: Install Chromium
77+
run: pnpm exec playwright install --with-deps chromium
78+
79+
- name: Build the package and the demo
80+
run: |
81+
pnpm devtools:build-pkg
82+
pnpm build --configuration development
83+
84+
# Starts the demo on port 5401 itself. Two checks fail today on open issues and are marked
85+
# as known failures in the script, so they print XFAIL and do not fail the job:
86+
# - expiry: a crashed tab stays listed for about 150 s (#422);
87+
# - stress: the forms collector keeps 100 children per group and does not say so (#423).
88+
# The soak check (`soak --minutes 30`) is manual only.
89+
- name: Check multitab, expiry, lifecycle and stress
90+
run: pnpm e2e:resilience multitab expiry lifecycle stress --json dist/e2e-resilience.json
91+
92+
- name: Keep the results
93+
if: always()
94+
uses: actions/upload-artifact@v4
95+
with:
96+
name: e2e-resilience
97+
path: dist/e2e-resilience.json
98+
if-no-files-found: ignore
99+
100+
install:
101+
name: Install ${{ matrix.name }}
102+
runs-on: ubuntu-latest
103+
timeout-minutes: 90
104+
strategy:
105+
# Every cell reports, so one week's failures are all visible at once.
106+
fail-fast: false
107+
matrix:
108+
include:
109+
- name: angular-cli
110+
args: --scenarios=angular-cli --pm=npm,pnpm --angular=20.3,21,22 --no-audit
111+
- name: angular-cli-serve
112+
args: --scenarios=angular-cli-serve --pm=npm,pnpm --angular=20.3,21,22 --no-audit
113+
- name: angular-cli-nossr
114+
args: --scenarios=angular-cli-nossr --pm=npm,pnpm --angular=20.3,21,22 --no-audit
115+
- name: analog
116+
args: --scenarios=analog --pm=pnpm --no-audit
117+
- name: cli
118+
args: --scenarios=cli --pm=npm,pnpm --no-audit
119+
- name: package-audit
120+
args: --audit-only
121+
steps:
122+
- uses: actions/checkout@v7
123+
with:
124+
persist-credentials: false
125+
126+
- uses: ./.github/actions/setup
127+
128+
- name: Install Chromium
129+
run: pnpm exec playwright install --with-deps chromium
130+
131+
# Packs the package, publishes it to a throwaway local registry (port 4873, the apps on the
132+
# ports after it) and installs it into fresh apps. A failed run keeps only the logs.
133+
- name: Run the cells
134+
run: >-
135+
pnpm e2e:install ${{ matrix.args }}
136+
--report=dist/e2e-install/report.json --logs=dist/e2e-install/logs
137+
138+
- name: Keep the report and the logs
139+
if: always()
140+
uses: actions/upload-artifact@v4
141+
with:
142+
name: e2e-install-${{ matrix.name }}
143+
path: dist/e2e-install
144+
if-no-files-found: ignore
145+
146+
report:
147+
name: Report the failure
148+
needs: [panel, resilience, install]
149+
if: failure() && github.event_name == 'schedule'
150+
runs-on: ubuntu-latest
151+
timeout-minutes: 5
152+
permissions:
153+
# One open issue for the weekly run, found by its title.
154+
issues: write
155+
steps:
156+
- env:
157+
GH_TOKEN: ${{ github.token }}
158+
GH_REPO: ${{ github.repository }}
159+
RUN: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
160+
run: |
161+
title="ci: the weekly e2e run fails"
162+
body="A job of the weekly E2E workflow failed: $RUN. The run's artifacts hold the reports and logs."
163+
number=$(gh issue list --state open --search "\"$title\" in:title" --json number,title \
164+
| jq -r --arg title "$title" 'map(select(.title == $title)) | .[0].number // empty')
165+
if [ -n "$number" ]; then
166+
gh issue comment "$number" --body "Still failing: $RUN"
167+
else
168+
gh issue create --title "$title" --body "$body" --label bug --label 'area: ci'
169+
fi

‎.github/workflows/latest.yml‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
name: Latest versions
22

3-
# The package declares `@angular/core >=20` and `vite >=5`, and this repository pins the versions
4-
# it tests on, so a new Angular, Analog or Vite release can break users between our releases
5-
# without CI noticing (#100). Each week this makes fresh apps the way users do, on whatever those
6-
# ranges resolve to that day, installs the package from a local registry, wires the documented
7-
# setup, builds it and checks the hub answers. See apps/docs/src/content/contributing/publishing.md.
3+
# The package declares `@angular/core >=12.2.0 <23.0.0` and `vite >=5`, and this repository pins
4+
# the versions it tests on, so a new Angular, Analog or Vite release can break users between our
5+
# releases without CI noticing (#100). Each week this makes fresh apps the way users do, on whatever
6+
# those ranges resolve to that day, installs the package from a local registry, wires the
7+
# documented setup, builds it and checks the hub answers (`pnpm verify:publish`). The release
8+
# runs the same check on the tarball it publishes. See
9+
# apps/docs/src/content/contributing/publishing.md#releasing.
810
on:
911
schedule:
1012
# Mondays at 06:00 UTC.

0 commit comments

Comments
 (0)