Skip to content

Improve pattern discovery and build reliability in watch mode#247

Draft
DomagojGojak wants to merge 1 commit intorelease/1.2.2from
feature/pattern-watcher-reliability
Draft

Improve pattern discovery and build reliability in watch mode#247
DomagojGojak wants to merge 1 commit intorelease/1.2.2from
feature/pattern-watcher-reliability

Conversation

@DomagojGojak
Copy link
Copy Markdown
Collaborator

  • Added watchPatternDirectories — detects newly created pattern subdirectories at runtime, mirroring the existing component directory watcher with a corrected rebuild sequence (previews-only for referenced components, then targeted buildPatterns)
  • Refactored watchComponentDirectories into a shared watchEntityDirectories factory, eliminating duplicated scaffolding that would otherwise be required to handle both components and patterns
  • Fixed .handoff.ts files not being detected by the config-file gate (affected both components and patterns)
  • Extended the build cache key in getComponentFilePaths to include pattern config files that reference a component, preventing stale cache hits when a pattern is added between sessions
  • Graceful handling of empty/incomplete pattern config files during dev: downgraded from error to warn, skips the build attempt, and automatically retries when the file is saved with valid content
  • Improved 404 handling for pattern pages — when a renamed pattern's stale URL is visited, the app now shows a properly styled 404 page inside the site layout instead of a bare red error text on a white screen. The 404 UI was extracted into a shared NotFound component, reused across both pattern and doc pages.

@DomagojGojak DomagojGojak force-pushed the feature/pattern-watcher-reliability branch from fcfb2be to 96b62e2 Compare April 17, 2026 15:04
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