Skip to content

fix(demo-schema-react): share the related document list j:SVCC-6608 - #8714

Open
dguerinCoveo wants to merge 3 commits into
feat/mock-comparison-related-documentsfrom
refactor/related-document-list
Open

dguerinCoveo wants to merge 3 commits into
feat/mock-comparison-related-documentsfrom
refactor/related-document-list

Conversation

@dguerinCoveo

@dguerinCoveo dguerinCoveo commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Jira

https://coveord.atlassian.net/browse/SVCC-6608

Motivation

The research card's list of related documents becomes a shared component, so the comparison table in #8712 can reuse it. Links now open only http(s) URIs, as the rich content grounding design requires.

Changes

  • RelatedDocumentList holds the rows, the size format, the maxLinks rule and which documents to show. The research card uses it with no visible change.
  • A document whose clickUri isn't http(s) shows its title as plain text instead of a link. This changes the research card from #8675.
  • The list imports ProductResearchRelatedDocument from @coveo/thermidor-schema.

Details

  • Stacked on #8713.
  • The type export comes from @coveo/thermidor-schema 1.0.0-beta.30, pinned in #8713.

Validation

  1. Run pnpm exec vitest run in samples/thermidor/demo-schema-react. The research card tests pass, including a javascript: link rendered as text.

Checklist

🤖 Generated with Claude Code

@changeset-bot

changeset-bot Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e45e897

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@svcsnykcoveo

svcsnykcoveo commented Oct 16, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@pkg-pr-new

pkg-pr-new Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

commit: e45e897

@chromatic-com

chromatic-com Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Tip

All tests passed and all changes approved!

🟢 UI Tests: 439 tests unchanged
🟢 UI Review: 471 stories published -- no changes
Storybook icon Storybook Publish: 471 stories published

@dguerinCoveo
dguerinCoveo added this pull request to stack #8728 October 20, 2026 19:51
@dguerinCoveo
dguerinCoveo requested a balanced review from Copilot October 20, 2026 19:51

Copilot AI left a comment

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.

🟡 Changes recommended

The new type import is unavailable in the pinned schema release, leaving TypeScript checking broken.

1 open issue
What changed in this PR

Extracts the research card’s related-document list for reuse by the upcoming comparison-table feature.

Changes:

  • Shares document rendering, filtering, limits, size formatting, and styles.
  • Restricts document links to HTTP(S).
  • Adds coverage for non-HTTP(S) links and NaN limits.
File Description
samples/​thermidor/​demo-schema-react/​src/​a2ui/​RelatedDocuments/​RelatedDocumentList.tsx Adds shared rendering and document helpers.
samples/​thermidor/​demo-schema-react/​src/​a2ui/​RelatedDocuments/​RelatedDocumentList.module.css Houses extracted document-row styles.
samples/​thermidor/​demo-schema-react/​src/​a2ui/​ProductResearchCard/​ProductResearchCard.tsx Uses the shared list and helpers.
samples/​thermidor/​demo-schema-react/​src/​a2ui/​ProductResearchCard/​ProductResearchCard.test.tsx Updates imports and adds edge-case coverage.
samples/​thermidor/​demo-schema-react/​src/​a2ui/​ProductResearchCard/​ProductResearchCard.module.css Removes extracted list styles.

Review effort: Balanced

dguerinCoveo and others added 3 commits October 20, 2026 15:56
The research card's document rows move into RelatedDocumentList so the
comparison table can reuse them. Links now open only http(s) URIs; any
other scheme shows the title as plain text, as the design requires.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…om the schema

thermidor-schema#173 exports the shared document type from the package
root, so the list no longer derives it from ProductResearchCardState.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dguerinCoveo
dguerinCoveo force-pushed the refactor/related-document-list branch from 29247e7 to e45e897 Compare October 20, 2026 20:06
@dguerinCoveo
dguerinCoveo removed this pull request from stack #8728 October 20, 2026 20:07
@dguerinCoveo
dguerinCoveo added this pull request to stack #8729 October 20, 2026 20:07
@dguerinCoveo
dguerinCoveo removed this pull request from stack #8729 October 20, 2026 20:08
@dguerinCoveo
dguerinCoveo added this pull request to stack #8730 October 20, 2026 20:08
@dguerinCoveo
dguerinCoveo requested a balanced review from Copilot October 20, 2026 20:08

Copilot AI left a comment

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.

🟢 Approval recommended

The focused extraction preserves existing behavior apart from the tested, intentional link restriction, with no unresolved findings.

1 open issue

Review effort: Balanced

@dguerinCoveo dguerinCoveo changed the title refactor(demo-schema-react): share the related document list j:SVCC-6608 fix(demo-schema-react): share the related document list j:SVCC-6608 Oct 20, 2026
@dguerinCoveo
dguerinCoveo marked this pull request as ready for review October 21, 2026 11:25

This branch was successfully deployed

2 active deployments
PR Artifacts — e45e897d Deployed Oct 20, 2026 by dguerinCoveo via Build & commit missing generated files #20202
pr-workflows — e45e897d Deployed Oct 20, 2026 by dguerinCoveo via label #9819
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.

3 participants