Conversation
|
To use Codex here, create a Codex account and connect to github. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 779a18d413
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
packages/catalog-realm/submission-card/submission-card-portal.gts
Outdated
Show resolved
Hide resolved
Host Test Results 1 files ±0 1 suites ±0 2h 34m 9s ⏱️ + 8m 38s For more details on these errors, see this check. Results for commit 7da073b. ± Comparison against base commit e96da31. ♻️ This comment has been updated with latest results. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4e9ba01196
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| get prCardInstance() { | ||
| return this.prCardData?.instances?.[0] ?? null; |
There was a problem hiding this comment.
Sort PR-card search before taking first result
prCardInstance always selects instances[0], but the query only filters by branchName and does not define a sort order. The index query engine defaults unsorted searches to ORDER BY url (packages/runtime-common/index-query-engine.ts:583-586), so if multiple PR cards exist for the same branch (for example after closing and reopening a PR), this can resolve to an older card instead of the current one; please add an explicit descending sort (e.g., by lastModified or submittedAt) before reading the first instance.
Useful? React with 👍 / 👎.
607ff12 to
afa3185
Compare
There was a problem hiding this comment.
Pull request overview
Adds a “Submission Card Portal” experience and updates the submission/PR card workflow so newly created SubmissionCards link directly to their corresponding PrCard, with refreshed card UIs and bot-runner orchestration to create/link these records.
Changes:
- Introduces
SubmissionCardPortalUI to discover and browseSubmissionCardinstances across realms (search + grid/strip views + realm filters). - Updates
SubmissionCardto link toPrCard, adds fitted/isolated templates, and enhances file field rendering. - Extends bot-runner PR creation flow to generate PR summary, create
PrCardin/submissions/, and patchSubmissionCard.prCard; updatesPrCardUI (mergeability + markdown summary) and review state normalization.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/catalog-realm/submission-card/submission-card.gts | Links SubmissionCard to PrCard, adds fitted/isolated templates, and adds FileContentField atom/embedded rendering. |
| packages/catalog-realm/submission-card/submission-card-portal.gts | New portal card to browse/search SubmissionCards across realms, with live query + realm tabs. |
| packages/catalog-realm/submission-card/components/portal/realm-tabs.gts | New realm filter tabs component used by the portal. |
| packages/catalog-realm/submission-card/components/card/isolated-template.gts | New isolated UI for SubmissionCard, including PR review status and file display. |
| packages/catalog-realm/submission-card/components/card/fitted-template.gts | New fitted UI for SubmissionCard list/grid rendering. |
| packages/catalog-realm/submission-card/README.md | Documents the updated submission → PR card linking flow and key files. |
| packages/catalog-realm/pr-card/utils.ts | Simplifies ReviewState values and normalization behavior. |
| packages/catalog-realm/pr-card/pr-card.gts | Adds markdown PR summary field and mergeability section; removes prior plain-text summary section. |
| packages/catalog-realm/pr-card/components/isolated/summary-section.gts | Removes old summary component. |
| packages/catalog-realm/pr-card/components/isolated/review-section.gts | Treats unknown review state as “Pending Review” with styling. |
| packages/catalog-realm/pr-card/components/isolated/mergeable-section.gts | New mergeability banner component. |
| packages/catalog-realm/commands/process-github-event.gts | Stops creating PR cards during webhook processing; only stores GithubEventCard. |
| packages/catalog-realm/commands/create-submission.ts | Sets branchName on SubmissionCard using toBranchName(...). |
| packages/catalog-realm/commands/create-pr-card.ts | Accepts/saves prSummary and returns saved card from SaveCardCommand. |
| packages/catalog-realm/catalog-app/components/cards-display-section.gts | Uses --primary token for hover border color fallback. |
| packages/catalog-realm/catalog-app/components/card-with-hydration.gts | Uses --primary token for hover outline color fallback. |
| packages/catalog-realm/SubmissionCardPortal/b535d5fb-8eef-44a6-8114-4bce6929b95a.json | Adds an instance JSON for the new SubmissionCardPortal card. |
| packages/bot-runner/tests/create-listing-pr-handler-test.ts | Verifies PR creation returns metadata + generated summary; adds “returns null” cases. |
| packages/bot-runner/tests/command-runner-test.ts | Updates CommandRunner construction + validates PR card creation and SubmissionCard patch jobs. |
| packages/bot-runner/tests/bot-runner-test.ts | Updates expectations for additional jobs enqueued during pr-listing-create flow. |
| packages/bot-runner/lib/timeline-handler.ts | Updates CommandRunner construction to include submission bot user id. |
| packages/bot-runner/lib/create-listing-pr-handler.ts | Returns PR metadata + summary, and maps open PR result into a typed return object. |
| packages/bot-runner/lib/command-runner.ts | Orchestrates create-submission → open PR → create PR card → patch submission relationship. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| {{#if this.lineCount}} | ||
| <span class='line-badge'>{{this.lineCount}} | ||
| line{{#if (isPlural this.lineCount)}}s{{/if}}</span> | ||
| {{/if}} |
| <span class='file-count-badge'> | ||
| <FileCodeIcon width='12' height='12' /> | ||
| {{this.fileCount}} | ||
| file{{#if (isPlural this.fileCount)}}s{{/if}} | ||
| </span> |
| .branch-name, | ||
| .room-id { | ||
| display: none; | ||
| margin: 0; | ||
| width: 100%; | ||
| min-width: 0; | ||
| display: flex; | ||
| align-items: end; | ||
| gap: var(--boxel-sp-5xs); | ||
| } |
| private debouncedSetSearch = debounce((value: string) => { | ||
| this.searchText = value; | ||
| }, 300); | ||
|
|
| prUrl: prResult.prUrl, | ||
| prTitle: prResult.prTitle, | ||
| branchName: prResult.branchName, | ||
| prSummary: prResult.summary, |
| <span class='mergeable-title'>This branch has no conflicts</span> | ||
| <span class='mergeable-subtitle'>Merging can be performed | ||
| automatically</span> |
| <div class='realm-tabs' role='tablist' aria-label='Filter by realm'> | ||
| <Pill | ||
| @kind='button' | ||
| class='realm-pill {{if (eq @selectedRealm null) "active"}}' | ||
| aria-selected={{if (eq @selectedRealm null) 'true' 'false'}} | ||
| {{on 'click' (fn @onChange null)}} |
| - `SubmissionCard.prCard` points across realms to the exact `PrCard` created after GitHub opens the PR. | ||
| - `SubmissionCard.branchName` remains as display/debug metadata. | ||
| - `PrCard.branchName` remains for display and webhook-event correlation. | ||
| - Submission card UI reads `@model.prCard` directly`. |
linear: https://linear.app/cardstack/issue/CS-10291/create-submission-card-portal
Screen.Recording.2026-03-12.at.8.19.29.PM.mov