Skip to content

feat(storybook): enable changeDetection + trim web/CLAUDE.md#1939

Merged
Aureliolo merged 2 commits into
mainfrom
feat/storybook-changedetection-playwright-abort
May 16, 2026
Merged

feat(storybook): enable changeDetection + trim web/CLAUDE.md#1939
Aureliolo merged 2 commits into
mainfrom
feat/storybook-changedetection-playwright-abort

Conversation

@Aureliolo
Copy link
Copy Markdown
Owner

Summary

Two opportunistic wins from the 2026-05-16 dependency bump, plus an unrelated web/CLAUDE.md density cleanup.

1. Storybook 10.4 features.changeDetection

Enabled in web/.storybook/main.ts. Tags stories in the sidebar as new / modified / affected based on git diff, with URL-persisted filters. Useful when running npm --prefix web run storybook during visual review of a feature branch.

2. Playwright 1.60 test.abort sweep

Audited all 12 files in web/e2e/ for throw new Error(...) candidates inside fixtures / route handlers / beforeEach / beforeAll. Result: zero migrations.

The only throw new Error(...) across the suite lives at web/e2e/fixtures/websocket-harness.ts:116, inside a page.evaluate(...) callback. That callback runs in the browser context, where test from @playwright/test is not in scope. The existing throw already surfaces clearly as an EvaluationError, so leaving as-is is the right call.

3. web/CLAUDE.md trim (152 → 106 lines)

Driven by the principle that CLAUDE.md is for MANDATORY rules and non-obvious gotchas, not a feature changelog or reference catalog.

Removed:

  • ## Performance Benchmarks section (implementation detail of bench.ts + bundle-size).
  • SSE-fallback behaviour paragraph from the Zustand section (described behaviour, not a rule).
  • ## Base UI Adoption Decisions section (reference catalog; still linked from docs/reference/).
  • 16-bullet ### Component reuse: don't recreate these inline catalog (replaced with 2-bullet ### Anti-patterns (lint-enforced) keeping only icon-helpers + viewport-size, both of which tie to actual ESLint rules).

Condensed:

  • App.tsx CSP nonce intro paragraph.
  • Package Structure section.
  • Generated DTO types paragraph (kept the rule: "never hand-edit *.gen.ts; regenerate via scripts/generate_dto_types_ts.py").

Test plan

  • npm --prefix web run storybook:build ✅ — confirms features.changeDetection is a valid Storybook 10.4 flag (no unknown-feature error).
  • npm --prefix web run lint ✅ — no fallout.
  • No Python / Go scope touched, so backend / CLI suites not run.

Review coverage

Pre-reviewed by 3 agents (docs-consistency, comment-quality-rot, tool-parity-checker); 0 findings.

  • docs-consistency: verified all outbound links in trimmed web/CLAUDE.md resolve, and that docs/reference/web-base-ui-decisions.md is still linked from 3 other reference pages (not orphaned).
  • comment-quality-rot: clean (no reviewer citations, no #N back-refs, no migration framing in commits or diff).
  • tool-parity-checker: clean (opencode.json still includes web/CLAUDE.md in instructions[]; no .opencode/ references to removed sections).

Aureliolo added 2 commits May 16, 2026 18:32
Adds features.changeDetection to web/.storybook/main.ts so the sidebar
tags stories as new / modified / affected based on git diffs, with
URL-persisted filters. Verified via storybook:build.
Removes content that does not belong in a high-density rules file:
- Performance Benchmarks section (implementation detail of bench.ts)
- SSE-fallback behaviour paragraph (describes how, not a rule)
- Base UI Adoption Decisions catalog (reference info, link kept)
- Component reuse bulleted catalog (16 entries; reference doc covers them)

Condensed:
- App.tsx CSP nonce intro
- Package Structure description
- Generated DTO types paragraph to the rule (do not hand-edit, regen via X)

Kept the two component-reuse entries that ARE rules (lint-enforced icon
helper and viewport-size anti-patterns).
@github-actions
Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 16, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8708ec80-b2f0-4e8b-b5fe-952786eba80d

📥 Commits

Reviewing files that changed from the base of the PR and between d19fae5 and 8c50e13.

📒 Files selected for processing (2)
  • web/.storybook/main.ts
  • web/CLAUDE.md
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Build Web Assets (melange)
  • GitHub Check: Lighthouse Dashboard
  • GitHub Check: CodSpeed Web benchmarks
  • GitHub Check: Dashboard Test
  • GitHub Check: Analyze (python)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{md,rst}

📄 CodeRabbit inference engine (CLAUDE.md)

Numerics in README and public docs sourced from data/runtime_stats.yaml via <!--RS:NAME--> markers per data/README.md

Files:

  • web/CLAUDE.md
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: Aureliolo/synthorg

Timestamp: 2026-05-16T16:45:04.216Z
Learning: Bump the WebSocket protocol version on both client and server sides together for breaking payload changes; drift is enforced at pre-commit/pre-push by `scripts/check_ws_protocol_version_in_sync.py`
Learnt from: CR
Repo: Aureliolo/synthorg

Timestamp: 2026-05-16T16:45:04.216Z
Learning: The error codes generator (`scripts/generate_error_codes_ts.py`) reads `src/synthorg/core/error_taxonomy.py`; drift is enforced at pre-push by `scripts/check_error_codes_ts_in_sync.py`
Learnt from: CR
Repo: Aureliolo/synthorg

Timestamp: 2026-05-16T16:45:04.216Z
Learning: Run lint via `npm --prefix web run lint` with `--max-warnings 0` enforced; enumerate stale `eslint-disable` directives with `--report-unused-disable-directives-severity=warn`
Learnt from: CR
Repo: Aureliolo/synthorg

Timestamp: 2026-05-16T16:45:04.216Z
Learning: The PostToolUse hook (`scripts/check_web_design_system.py`) runs on every `web/src/` edit and flags hardcoded hex/rgba/fonts/Motion durations/locale literals/bare `.toLocale*String()` calls/missing Storybook stories/duplicate component patterns/complex `.map()` blocks; fix every violation before proceeding
🔇 Additional comments (2)
web/CLAUDE.md (1)

3-3: LGTM!

Also applies to: 27-27, 60-60, 84-87

web/.storybook/main.ts (1)

10-12: ⚡ Quick win

No issues found. The changeDetection feature flag is valid and correctly configured in Storybook 10.4.


Walkthrough

This PR updates Storybook's configuration to enable the changeDetection feature and restructures the developer guidelines in CLAUDE.md. The Storybook change adds a features block to enable change detection during story rendering. The documentation updates condense the CSP/dashboard description, introduce a new "Package Structure" section with benchmark constraints, clarify error-handling and DTO policies, replace the component-reuse anti-pattern list with lint-enforced rules for icon helpers and viewport queries, and add a new "Post-Training Reference" section covering TypeScript 6 and Storybook 10 gotchas.

Suggested labels

autorelease: tagged

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately captures the two main changes: enabling Storybook's changeDetection feature and trimming web/CLAUDE.md documentation.
Description check ✅ Passed The description provides comprehensive context for all changes in the PR, including the Storybook feature enablement, Playwright audit results, and detailed rationale for CLAUDE.md trimming.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request enables change detection in the Storybook configuration and refactors the web/CLAUDE.md file to condense documentation and remove redundant implementation details. Feedback was provided regarding the consolidation of performance benchmarks into the 'Package Structure' section, noting that the content is now unrelated to the header and suggesting a more inclusive title for better organization.

Comment thread web/CLAUDE.md

Bundle-size budgets are declared in `web/.size-limit.cjs` (per-vendor-chunk gzipped ceilings) and enforced by the `dashboard-build` job in `.github/workflows/ci.yml`. Raise a budget intentionally only when a feature legitimately requires more shipping JS, never just to silence a CI red.

## Package Structure
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.

medium

The content added to this section (benchmarks and bundle-size budgets) is unrelated to 'Package Structure'. Consider renaming the header to reflect the combined scope or keeping the separate 'Performance Benchmarks' header to maintain logical organization and discoverability for the agent.

Suggested change
## Package Structure
## Performance & Package Structure

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 16, 2026

Merging this PR will not alter performance

✅ 21 untouched benchmarks
⏩ 33 skipped benchmarks1


Comparing feat/storybook-changedetection-playwright-abort (8c50e13) with main (7368685)2

Open in CodSpeed

Footnotes

  1. 33 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (d19fae5) during the generation of this report, so 7368685 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@Aureliolo Aureliolo merged commit 3b1f4c0 into main May 16, 2026
73 checks passed
@Aureliolo Aureliolo deleted the feat/storybook-changedetection-playwright-abort branch May 16, 2026 16:52
Aureliolo pushed a commit that referenced this pull request May 17, 2026
<!-- HIGHLIGHTS_START -->
## Highlights

> _AI-generated summary (model: `openai/gpt-4.1-mini` via GitHub
Models). Commit-based changelog below._

### What you'll notice
- Frontend WP-6 update with UX polish improves user interface and
workflow.
- Dashboard and training endpoint improvements enhance observability and
dispatch behavior.
- Web storybook now supports change detection for more responsive UI
interactions.
- Git hooks now isolated per worktree for cleaner repository management.
- Providers automatically detect native streaming support in Litellm
models.

### What's new
- Added a new pipeline to convert Pydantic DTOs to TypeScript for better
front-end compatibility.

### Under the hood
- Refactored settings to three precedence categories, removing YAML tier
for simpler configuration.
- Completed RootConfig mirror coverage for enhanced configuration
consistency.
- Adopted API conventions with better query performance and forbidden
extra fields for stricter validation.
- Improved persistence, layer discipline, and restart safety in core
work packages.
- CI updated with split test jobs and tightened coverage gates for
better test quality.
- Switched to direct Trivy binary for security scans, removing previous
Trivy action dependency.
- Enhanced memory management with per-call processing options and better
observability during speech-to-text encoding.
- Various dependency updates for Python, infrastructure, and lock files
maintain security and stability.
- Removed TypeScript DTO type-tightening overlays to simplify type
management.
- Codebase audit tightened skill sets to prevent false positivity in
class detection by 2026.

<!-- HIGHLIGHTS_END -->

:robot: I have created a release *beep* *boop*
---


##
[0.8.5](v0.8.4...v0.8.5)
(2026-05-17)


### Features

* **codegen:** pydantic-to-typescript DTO pipeline + parity gate (closes
[#1889](#1889))
([#1909](#1909))
([0265ef5](0265ef5))
* **storybook:** enable changeDetection + trim web/CLAUDE.md
([#1939](#1939))
([3b1f4c0](3b1f4c0))
* **web,setup:** WP-6 frontend + UX polish
([#1941](#1941))
([d9ca76d](d9ca76d))


### Bug Fixes

* correct invalid git for-each-ref syntax in post-merge-cleanup skill
([#1946](#1946))
([69a1649](69a1649))
* dashboard polish, training endpoint dispatch, and observability
cleanup ([#1911](#1911))
([b61e9e8](b61e9e8))
* per-worktree git-hook isolation + hookify gate migration + MSW drift
fix ([#1949](#1949))
([e3f8495](e3f8495))
* **providers:** read supports_native_streaming from litellm model info
([#1942](#1942))
([60364ca](60364ca))
* security and audit coverage (closes
[#1883](#1883))
([#1904](#1904))
([d8ebf55](d8ebf55))


### Performance

* **ci:** mypy --num-workers=4 + enable ruff TID255
([#1944](#1944))
([484c1d3](484c1d3))


### Refactoring

* **ci:** drop aquasecurity/trivy-action, use direct trivy binary
([#1940](#1940))
([df1f946](df1f946))
* **memory:** per-call processing_kwargs + observability for ST encode
([#1943](#1943))
([3aa9d20](3aa9d20))
* Phase 7 follow-up — complete RootConfig mirror coverage (closes
[#1907](#1907))
([#1914](#1914))
([605500b](605500b))
* **settings:** collapse precedence to three categories; drop YAML tier
(closes [#1890](#1890))
([#1910](#1910))
([efd54c9](efd54c9))
* WP-3 API conventions + query performance + project-wide extra=forbid
([#1953](#1953))
([504d579](504d579)),
closes [#1918](#1918)
* WP-4 settings + cross-cutting (clock seam, contextvars, dispatch,
plugin surfaces)
([#1954](#1954))
([7207d92](7207d92))
* **wp1:** persistence + layer discipline + restart safety
([#1945](#1945))
([57586fb](57586fb))


### Documentation

* **wp5:** public-facing truth refresh
([#1924](#1924))
([afb5cc5](afb5cc5))


### CI/CD

* split test job by marker with airtight aggregate coverage gate
([#1948](#1948))
([0b818d5](0b818d5)),
closes [#1938](#1938)
[#1937](#1937)


### Maintenance

* **codebase-audit:** tighten skill to prevent 2026-05-15 FP classes
([#1923](#1923))
([9317ed1](9317ed1))
* Lock file maintenance
([#1913](#1913))
([c08a355](c08a355))
* Lock file maintenance
([#1950](#1950))
([8940ab1](8940ab1))
* remove TS DTO type-tightening overlays
([#1915](#1915))
([d296214](d296214)),
closes [#1906](#1906)
* Update Infrastructure dependencies
([#1928](#1928))
([d19fae5](d19fae5))
* Update Python dependencies
([#1929](#1929))
([75cc2c8](75cc2c8))
* **wp7:** hygiene, stubs, test/CI/tooling, doc gaps, boundary patterns
doc ([#1926](#1926))
([c29eb32](c29eb32))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: synthorg-repo-bot[bot] <279117679+synthorg-repo-bot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant