Skip to content

Add tests#366

Open
maximiliani wants to merge 55 commits into362-automatic-pid-detectionfrom
add-tests
Open

Add tests#366
maximiliani wants to merge 55 commits into362-automatic-pid-detectionfrom
add-tests

Conversation

@maximiliani
Copy link
Copy Markdown
Member

No description provided.

Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
should be contained in gitignore
…triggers

Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
…ht options

Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
…root

Replace Playwright e2e tests with Vitest browser-mode equivalents, add
vitest.config.ts and vitest-setup.ts, remove the per-package Storybook
configuration (.storybook/) since it now lives at the monorepo root, and
update package.json scripts, tsconfig, and eslint config accordingly.
Set up the monorepo-root Storybook using @storybook/web-components-vite
with composition refs for React (Vite), React (Next.js), Vue 3, and
Angular sub-Storybooks. Add build-storybook pipeline that builds each
child Storybook and copies output to react-vite/, react-nextjs/, vue/,
and angular/ subdirectories. Include vitest config for Storybook tests,
background/a11y parameters, and concurrently-based dev scripts.
Configure @storybook/react-vite with viteFinal aliases for Stencil
package resolution. Include PidComponent stories covering all PID types,
dark/light/system mode, and renderer selection. Add comprehensive
auto-detection stories demonstrating initPidDetection() with mixed PIDs,
filtered renderers, dark mode, excluded elements, tables, controller
lifecycle, and punctuation handling. Remove CopyButton/JsonViewer stories
(kept only in the root Stencil Storybook).
Configure @storybook/vue3-vite with viteFinal aliases for Stencil
package resolution. Include PidComponent stories and comprehensive
auto-detection stories using Vue composition API (defineComponent with
onMounted/onUnmounted). Remove CopyButton/JsonViewer stories.
Configure @storybook/angular with webpackFinal aliases to resolve Stencil
package subpaths that webpack cannot handle through exports maps. Add
standalone tsconfig.storybook.json to avoid declarationDir conflicts.
Include PidComponent stories and auto-detection stories using play()
functions with dynamic imports. Remove CopyButton/JsonViewer stories.
Create packages/nextjs-app as a private (non-published) Next.js app that
consumes @kit-data-manager/react-pid-component. Configure Storybook with
@storybook/nextjs-vite and viteFinal aliases. Include PidComponent
stories and comprehensive auto-detection stories with controller
lifecycle demo. The app serves as both an integration test and a Storybook
sub-project deployed at /react-nextjs.
Update deploy-storybook workflow to build all sub-Storybooks and deploy
the composed output to GitHub Pages. Update npm-ci and Chromatic
workflows for the new monorepo structure. Add storybook-static to
.gitignore, update lerna.json, and refresh package-lock.json.
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
…r improved static builds

Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
…laywright

Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
…t (again...)

Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
…t (again...)

Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
@github-actions
Copy link
Copy Markdown

Test Coverage Report

Metric Coverage
Statements 43.63%
Branches 36.71%
Functions 50.16%
Lines 44.73%

Coverage collected from packages/stencil-library via V8 provider.

Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
…rability of the pid-component

Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
- Introduced 'expanded' property for PidCollapsible to manage floating overlay behavior.
- Updated components and styles to support the new property.
- Added DatasetsPage and AboutPage components for enhanced data presentation.
- Refactored existing components to integrate new features and improve usability.

Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
…ated references

Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
@maximiliani maximiliani marked this pull request as ready for review April 20, 2026 23:03
Copilot AI review requested due to automatic review settings April 20, 2026 23:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR expands automated testing and modernizes the repo’s tooling/docs while bumping packages to 0.4.0, including new Storybook composition and framework demo apps.

Changes:

  • Added Stencil Vitest spec/e2e tests plus an axe-core helper for accessibility checks.
  • Updated auto-detection behavior/docs and refined several renderer/component preview styles.
  • Reworked monorepo tooling (Vitest/Playwright/Storybook composition, CI workflows) and added React/Next.js/Angular demo Storybooks.

Reviewed changes

Copilot reviewed 197 out of 448 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
packages/stencil-library/src/test/components/copy-button/copy-button.e2e.tsx Adds copy-button e2e coverage
packages/stencil-library/src/test/components/color-highlight/color-highlight.spec.tsx Adds color-highlight spec + a11y
packages/stencil-library/src/test/components/color-highlight/HSLColor.spec.ts Adds HSLColor unit tests
packages/stencil-library/src/test/axe-helper.ts Adds axe-core runner for mock DOM
packages/stencil-library/src/test/auto-detect/auto-detect.e2e.tsx Adds auto-detect e2e tests
packages/stencil-library/src/rendererModules/URLType.tsx Removes unused-vars suppression
packages/stencil-library/src/rendererModules/SPDXType.tsx Tweaks SPDX quick-format and preview layout
packages/stencil-library/src/rendererModules/RORType.tsx Adds typed ROR API shape + layout tweaks
packages/stencil-library/src/rendererModules/ORCiD/ORCIDType.tsx Preview layout tweaks
packages/stencil-library/src/rendererModules/LocaleType.tsx Removes unused-vars suppression
packages/stencil-library/src/rendererModules/JSONType.tsx Preview layout tweaks
packages/stencil-library/src/rendererModules/Handle/HandleType.tsx Removes unused-vars suppression
packages/stencil-library/src/rendererModules/FallbackType.tsx Removes unused-vars suppression
packages/stencil-library/src/rendererModules/EmailType.tsx Email preview SVG/layout tweaks
packages/stencil-library/src/rendererModules/DateType.tsx Removes unused-vars suppression
packages/stencil-library/src/rendererModules/DOI/ResourceTypeIcons.tsx Removes unused-vars suppression
packages/stencil-library/src/rendererModules/DOI/DOIType.tsx DOI preview layout tweaks
packages/stencil-library/src/components/pid-tooltip/pid-tooltip.tsx Removes unused-vars suppression
packages/stencil-library/src/components/pid-tooltip/pid-tooltip.stories.ts Adds stable Storybook story ids
packages/stencil-library/src/components/pid-pagination/pid-pagination.tsx Stronger typing for collapsible calls
packages/stencil-library/src/components/pid-pagination/pid-pagination.stories.ts Adds stable Storybook story ids
packages/stencil-library/src/components/pid-data-table/pid-data-table.tsx Typing + table spacing tweaks
packages/stencil-library/src/components/pid-data-table/pid-data-table.stories.ts Adds stable Storybook story ids
packages/stencil-library/src/components/pid-component/readme.md README table formatting tweak
packages/stencil-library/src/components/pid-component/pid-component.css Adds shadow-root utility styles + overflow handling
packages/stencil-library/src/components/pid-collapsible/readme.md Updates docs for expanded + method return type
packages/stencil-library/src/components/pid-collapsible/pid-collapsible.stories.ts Adds stable Storybook story ids
packages/stencil-library/src/components/pid-collapsible/collapsible.css Adds overlay styling for expanded mode
packages/stencil-library/src/components/pid-actions/pid-actions.tsx Removes unused-vars suppression
packages/stencil-library/src/components/pid-actions/pid-actions.stories.ts Adds stable Storybook story ids
packages/stencil-library/src/components/locale-vizualization/locale-visualization.tsx Removes unused-vars suppression
packages/stencil-library/src/components/locale-vizualization/locale-visualization.stories.ts Moves story to Internal + adds ids
packages/stencil-library/src/components/json-viewer/json-viewer.tsx Removes unused-vars suppression
packages/stencil-library/src/components/json-viewer/json-viewer.stories.ts Moves story to Internal + adds ids
packages/stencil-library/src/components/copy-button/copy-button.tsx Refactors clipboard copy for Safari sync behavior
packages/stencil-library/src/components/copy-button/copy-button.stories.ts Adds stable Storybook story id
packages/stencil-library/src/components/color-highlight/color-highlight.tsx Removes unused-vars suppression
packages/stencil-library/src/components/color-highlight/color-highlight.stories.ts Moves story to Internal + adds ids
packages/stencil-library/src/auto-detect/types.ts Clarifies defaults + renderer selection docs
packages/stencil-library/src/auto-detect/initPidDetection.ts Docs + minor refactors + delimiter regex tweak
packages/stencil-library/src/auto-detect/auto-detect.mdx Updates docs and story references
packages/stencil-library/src/auto-detect/TextReplacer.ts Defaults emphasizeComponent to false in DOM
packages/stencil-library/src/auto-detect/DetectionWorker.ts Keeps delimiter regex in worker in sync
packages/stencil-library/somesy.toml Version bump to 0.4.0
packages/stencil-library/package.json Switches test scripts/tooling; version bump
packages/stencil-library/eslint.config.js Updates ignores and test/TSX unused-var rules
packages/stencil-library/codemeta.json Version bump to 0.4.0
packages/stencil-library/CITATION.cff Version bump to 0.4.0
packages/stencil-library/.gitignore Ignores coverage output
packages/stencil-library/playwright.config.ts Removes Playwright config (migrating away)
packages/stencil-library/.storybook/preview.ts Removes Stencil-local Storybook preview
packages/stencil-library/.storybook/main.ts Removes Stencil-local Storybook main
packages/react-library/vite.config.ts Adds Vite config for React Storybook
packages/react-library/stories/ResearchDemo.stories.tsx Adds React ResearchDemo story
packages/react-library/stories/PidComponent.stories.tsx Adds React wrapper PID stories
packages/react-library/somesy.toml Version bump to 0.4.0
packages/react-library/package.json Adds Storybook + demo deps; bumps pid-component dep
packages/react-library/lib/components/stencil-generated/components.server.ts Updates SSR bindings (expanded prop) + formatting
packages/react-library/demo/index.ts Exports demo entry points
packages/react-library/demo/context/AutodiscoveryContext.tsx Adds autodetection context/provider
packages/react-library/demo/components/index.ts Re-exports demo components
packages/react-library/demo/components/Navigation.tsx Adds Mantine-based navigation
packages/react-library/demo/components/LicenseDialog.tsx Adds Mantine modal with SPDX pid
packages/react-library/demo/components/HeroCard.tsx Adds Mantine hero + DOI card
packages/react-library/demo/components/Footer.tsx Adds demo footer
packages/react-library/demo/components/DatasetsPage.tsx Adds demo datasets page
packages/react-library/demo/components/DatasetTable.tsx Adds resizable table demo
packages/react-library/demo/components/AuthorCard.tsx Adds author card/grid demo
packages/react-library/demo/components/ArticleSection.tsx Adds autodetection zone demo
packages/react-library/demo/components/AboutPage.tsx Adds about tab showcase
packages/react-library/demo/ResearchDemoApp.tsx Adds full React demo app shell
packages/react-library/demo/DemoProvider.tsx Adds Mantine provider wrapper
packages/react-library/demo/AppProvider.tsx Adds app provider wrapper
packages/react-library/codemeta.json Version bump to 0.4.0
packages/react-library/CITATION.cff Version bump to 0.4.0
packages/react-library/.storybook/preview.tsx Registers Stencil elements in React SB
packages/react-library/.storybook/main.ts Adds aliases for workspace Stencil dist
packages/nextjs-app/tsconfig.json Adds Next.js demo tsconfig
packages/nextjs-app/tailwind.config.cjs Adds Tailwind config for demo
packages/nextjs-app/stories/ResearchDemo.stories.tsx Adds Next.js ResearchDemo story
packages/nextjs-app/stories/PidComponent.stories.tsx Adds Next.js wrapper PID stories
packages/nextjs-app/postcss.config.cjs Adds PostCSS config
packages/nextjs-app/package.json Adds Next.js demo package + deps
packages/nextjs-app/next.config.ts Transpiles workspace packages
packages/nextjs-app/app/research-nexus/page.tsx Adds ShadCN-style demo page
packages/nextjs-app/app/research-nexus/lib/utils.ts Adds cn utility
packages/nextjs-app/app/research-nexus/layout.tsx Adds nested layout/metadata
packages/nextjs-app/app/research-nexus/datasets/page.tsx Adds datasets route page
packages/nextjs-app/app/research-nexus/components/Navigation.tsx Adds Tailwind navigation
packages/nextjs-app/app/research-nexus/components/LicenseDialog.tsx Adds Radix dialog demo
packages/nextjs-app/app/research-nexus/components/HeroCard.tsx Adds hero/doi card components
packages/nextjs-app/app/research-nexus/components/Footer.tsx Adds footer component
packages/nextjs-app/app/research-nexus/components/DatasetTable.tsx Adds resizable Tailwind table
packages/nextjs-app/app/research-nexus/components/AuthorCard.tsx Adds Radix avatar author card
packages/nextjs-app/app/research-nexus/components/ArticleSection.tsx Adds autodetection article section
packages/nextjs-app/app/research-nexus/about/page.tsx Adds about route page
packages/nextjs-app/app/layout.tsx Adds root layout
packages/nextjs-app/app/globals.css Adds baseline global styles
packages/nextjs-app/app/components/Navbar.tsx Adds alternate navbar demo
packages/nextjs-app/app/components/Footer.tsx Adds alternate footer demo
packages/nextjs-app/app/components/DatasetCard.tsx Adds dataset card demo
packages/nextjs-app/app/components/AuthorCard.tsx Adds author card demo
packages/nextjs-app/app/about/page.tsx Adds about page demo
packages/nextjs-app/.storybook/preview.tsx Registers Stencil elements + Tailwind
packages/nextjs-app/.storybook/preview.css Adds Tailwind directives
packages/nextjs-app/.storybook/main.ts Adds aliases for workspace Stencil dist
packages/angular-library/tsconfig.storybook.json Adds TS config for Angular Storybook builder
packages/angular-library/tsconfig.json Aligns TS config with workspace + paths
packages/angular-library/stories/ResearchDemo.stories.ts Adds Angular ResearchDemo story
packages/angular-library/stories/PidComponent.stories.ts Adds Angular PID stories
packages/angular-library/src/main.ts Minimal Angular entrypoint for SB
packages/angular-library/src/index.html Minimal HTML for SB builder
packages/angular-library/src/app/research-demo.component.ts Adds Angular demo app shell
packages/angular-library/src/app/providers/autodiscovery.provider.ts Adds autodetection provider/service
packages/angular-library/src/app/index.ts Exports Angular demo modules
packages/angular-library/src/app/components/navigation.component.ts Adds Angular Material navigation
packages/angular-library/src/app/components/license-dialog.component.ts Adds license dialog stub
packages/angular-library/src/app/components/index.ts Re-exports demo components
packages/angular-library/src/app/components/hero-card.component.ts Adds hero card component
packages/angular-library/src/app/components/footer.component.ts Adds footer component
packages/angular-library/src/app/components/doi-card.component.ts Adds DOI card component
packages/angular-library/src/app/components/datasets-page.component.ts Adds datasets table component
packages/angular-library/src/app/components/author-card.component.ts Adds author card/grid components
packages/angular-library/src/app/components/article-section.component.ts Adds autodetection article section
packages/angular-library/src/app/components/about-page.component.ts Adds about tab showcase
packages/angular-library/somesy.toml Adds package metadata (0.4.0)
packages/angular-library/package.json Adds Angular/Storybook deps + scripts
packages/angular-library/lib/stencil-generated/index.ts Minor formatting tweak
packages/angular-library/angular.json Adds Angular builder targets for SB
packages/angular-library/.storybook/preview.ts Registers Stencil elements in Angular SB
packages/angular-library/.storybook/preview-head.html Adds Material Icons/Roboto
packages/angular-library/.storybook/main.ts Adds webpack aliases for Stencil dist
packages/angular-library/.gitignore Adds Angular-specific ignores
package.json Adds root scripts for build/test/storybook composition
lerna.json Sets npm as client
codemeta.json Version bump to 0.4.0 + keywords
CITATION.cff Version bump to 0.4.0 + keywords
.storybook/vitest.setup.ts Adds Storybook Vitest setup for Stencil dist
.storybook/preview.ts Adds root SB preview + story sorting
.storybook/manager.ts Adds custom manager config
.storybook/main.ts Adds stencil-core stub plugin + composition refs
.storybook/KITTheme.ts Adds custom KIT theme
.npmrc Enables legacy peer deps
.github/workflows/publish.yml Enables tests + coverage and Playwright install
.github/workflows/npm-ci.yml Expands CI: build SB, lint, tests, coverage comment
.github/workflows/deploy-storybook.yml Deploys composed Storybook
.github/workflows/chromatic.yml Adds Chromatic workflow
examples/url/values.ts Adds URL examples
examples/url/texts.ts Adds URL example texts
examples/url/index.ts Adds URL barrel exports
examples/spdx/values.ts Adds SPDX examples
examples/spdx/texts.ts Adds SPDX example texts
examples/spdx/index.ts Adds SPDX barrel exports
examples/ror/values.ts Adds ROR examples
examples/ror/texts.ts Adds ROR example texts
examples/ror/index.ts Adds ROR barrel exports
examples/orcid/values.ts Adds ORCID examples
examples/orcid/texts.ts Adds ORCID example texts
examples/orcid/index.ts Adds ORCID barrel exports
examples/locale/values.ts Adds locale examples
examples/locale/index.ts Adds locale barrel exports
examples/json/values.ts Adds JSON examples
examples/json/index.ts Adds JSON barrel exports
examples/index.ts Adds top-level examples barrel
examples/handle/values.ts Adds Handle examples
examples/handle/texts.ts Adds Handle example texts
examples/handle/index.ts Adds Handle barrel exports
examples/email/values.ts Adds email examples
examples/email/texts.ts Adds email example texts
examples/email/index.ts Adds email barrel exports
examples/doi/values.ts Adds DOI examples
examples/doi/texts.ts Adds DOI example texts
examples/doi/index.ts Adds DOI barrel exports
examples/date/values.ts Adds date examples
examples/date/texts.ts Adds date example texts
examples/date/index.ts Adds date barrel exports
examples/data.ts Adds shared demo data fixtures

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

*/
function detectOnMainThread(text: string, orderedRenderers?: string[]): DetectionMatch[] {
const DELIMITER_REGEX = /[\s,;()\[\]{}<>"']+/;
const DELIMITER_REGEX = /[\s,;()[\]{}<>"']+/;
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

This regular expression is syntactically invalid because [ is unescaped inside the character class (...[()[\\]... contains a raw [), which will throw at module parse time. Restore escaping for the literal brackets (e.g. \\[\\]) or place [ as the first character in the character class.

Suggested change
const DELIMITER_REGEX = /[\s,;()[\]{}<>"']+/;
const DELIMITER_REGEX = /[\s,;()\[\]{}<>"']+/;

Copilot uses AI. Check for mistakes.
* PIDs are expected to be whitespace- or punctuation-delimited tokens.
*/
const DELIMITER_REGEX = /[\s,;()\[\]{}<>"']+/;
const DELIMITER_REGEX = /[\s,;()[\]{}<>"']+/;
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

Same issue as on the main thread: this regex includes an unescaped [ inside a character class and will fail to compile. Update it to a valid bracket-delimiter character class (e.g. ...()\\[\\]...) to avoid runtime/parse failures in the worker.

Suggested change
const DELIMITER_REGEX = /[\s,;()[\]{}<>"']+/;
const DELIMITER_REGEX = /[\s,;()\[\]{}<>"']+/;

Copilot uses AI. Check for mistakes.
Comment on lines +12 to +19
imports: [
CommonModule,
MatToolbarModule,
MatButtonModule,
MatIconModule,
MatMenuModule,
PidComponent,
],
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

<mat-chip> and <mat-chip-set> are used in the template, but MatChipsModule is not imported in this standalone component. This will fail at runtime/template compilation. Add MatChipsModule to the imports array and ensure the dependency is present.

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +36
export function AutodiscoveryProvider({ children, config = {}, rootRef }: AutodiscoveryProviderProps) {
const internalRootRef = useRef<HTMLElement | null>(null);
const controllerRef = useRef<PidDetectionController | null>(null);
const isActiveRef = useRef(false);

const setRoot = (element: HTMLElement | null) => {
if (controllerRef.current || !element) return;
internalRootRef.current = element;
controllerRef.current = initPidDetection({
root: element,
darkMode: 'light',
...config,
});
isActiveRef.current = true;
};
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

When rootRef is not provided, setRoot is never called, so internalRootRef remains null and auto-detection never initializes. Either expose setRoot via context (so consumers can attach it as a callback ref), or change the provider API to always require a rootRef, or render an internal wrapper element within the provider and attach setRoot to it.

Copilot uses AI. Check for mistakes.
Comment on lines +84 to +85
###
`recalculateContentDimensions() => Promise<{ contentWidth: number; contentHeight: number; maxWidth: number; maxHeight: number; }>`
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

The Markdown heading is malformed: ### is on its own line and the method signature is rendered as plain code on the next line, which typically won’t format as a proper heading. Put the method signature on the same line as the heading (or use ### \recalculateContentDimensions()...``) to keep the README structure consistent and readable.

Suggested change
###
`recalculateContentDimensions() => Promise<{ contentWidth: number; contentHeight: number; maxWidth: number; maxHeight: number; }>`
### `recalculateContentDimensions() => Promise<{ contentWidth: number; contentHeight: number; maxWidth: number; maxHeight: number; }>`

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,55 @@
import { Injectable, ElementRef, inject, Optional, OnDestroy } from '@angular/core';
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

Two issues: (1) ElementRef and inject are imported but not used. (2) Exporting a manually-constructed AUTODISCOVERY_PROVIDER bypasses Angular DI and can create multiple instances with inconsistent lifecycle management. Prefer providing the service via DI (e.g. @Injectable({ providedIn: 'root' }) or module/component providers) and remove the exported singleton.

Copilot uses AI. Check for mistakes.
}
}

export const AUTODISCOVERY_PROVIDER = new AutodiscoveryProvider();
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

Two issues: (1) ElementRef and inject are imported but not used. (2) Exporting a manually-constructed AUTODISCOVERY_PROVIDER bypasses Angular DI and can create multiple instances with inconsistent lifecycle management. Prefer providing the service via DI (e.g. @Injectable({ providedIn: 'root' }) or module/component providers) and remove the exported singleton.

Copilot uses AI. Check for mistakes.
Comment on lines +56 to +57
await new Promise(r => setTimeout(r, 3000));
await waitForChanges();
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

These fixed setTimeout delays make the e2e tests slower and prone to flakes across environments. Replace the fixed sleeps with vi.waitFor (or another retry-based assertion) that waits until the expected DOM condition is met, and keep the timeout as a maximum rather than a constant delay.

Copilot uses AI. Check for mistakes.
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
@github-actions
Copy link
Copy Markdown

Test Coverage Report

Metric Coverage
Statements 43.42%
Branches 36.15%
Functions 49.67%
Lines 44.53%

This comment is automatically generated by the CI workflow.
The results are based on the coverage report generated by the tests. For more details, please check the full coverage report artifact uploaded by the workflow.
E2E tests are not included in the coverage report, so the actual coverage may be higher than reported here.
Please review the coverage report and consider adding more tests if the coverage is low. Thank you for your contribution!

Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
@github-actions
Copy link
Copy Markdown

Test Coverage Report

Metric Coverage
Statements 43.44%
Branches 35.92%
Functions 49.67%
Lines 44.55%

This comment is automatically generated by the CI workflow.
The results are based on the coverage report generated by the tests. For more details, please check the full coverage report artifact uploaded by the workflow.
E2E tests are not included in the coverage report, so the actual coverage may be higher than reported here.
Please review the coverage report and consider adding more tests if the coverage is low. Thank you for your contribution!

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.

2 participants