Skip to content

Cs 10291 create submission card portal#4103

Open
lucaslyl wants to merge 33 commits intomainfrom
CS-10291-create-submission-card-portal
Open

Cs 10291 create submission card portal#4103
lucaslyl wants to merge 33 commits intomainfrom
CS-10291-create-submission-card-portal

Conversation

@lucaslyl
Copy link
Contributor

@lucaslyl lucaslyl commented Mar 3, 2026

linear: https://linear.app/cardstack/issue/CS-10291/create-submission-card-portal

Screen.Recording.2026-03-12.at.8.19.29.PM.mov

@chatgpt-codex-connector
Copy link

To use Codex here, create a Codex account and connect to github.

@lucaslyl
Copy link
Contributor Author

lucaslyl commented Mar 3, 2026

@codex review

@lucaslyl lucaslyl marked this pull request as ready for review March 3, 2026 06:11
@lucaslyl lucaslyl marked this pull request as draft March 3, 2026 06:13
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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".

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

Host Test Results

    1 files  ±0      1 suites  ±0   2h 34m 9s ⏱️ + 8m 38s
2 030 tests ±0  2 014 ✅  - 1  15 💤 ±0  0 ❌ ±0  1 🔥 +1 
2 045 runs  ±0  2 028 ✅  - 2  15 💤 ±0  1 ❌ +1  1 🔥 +1 

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.

@lucaslyl
Copy link
Contributor Author

@codex review

@lucaslyl lucaslyl requested a review from a team March 10, 2026 15:10
@lucaslyl lucaslyl self-assigned this Mar 10, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +243 to +244
get prCardInstance() {
return this.prCardData?.instances?.[0] ?? null;

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@lucaslyl lucaslyl marked this pull request as ready for review March 11, 2026 03:17
@lucaslyl lucaslyl force-pushed the CS-10291-create-submission-card-portal branch from 607ff12 to afa3185 Compare March 11, 2026 13:22
Copy link
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

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 SubmissionCardPortal UI to discover and browse SubmissionCard instances across realms (search + grid/strip views + realm filters).
  • Updates SubmissionCard to link to PrCard, adds fitted/isolated templates, and enhances file field rendering.
  • Extends bot-runner PR creation flow to generate PR summary, create PrCard in /submissions/, and patch SubmissionCard.prCard; updates PrCard UI (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.

Comment on lines +86 to +89
{{#if this.lineCount}}
<span class='line-badge'>{{this.lineCount}}
line{{#if (isPlural this.lineCount)}}s{{/if}}</span>
{{/if}}
Comment on lines +142 to +146
<span class='file-count-badge'>
<FileCodeIcon width='12' height='12' />
{{this.fileCount}}
file{{#if (isPlural this.fileCount)}}s{{/if}}
</span>
Comment on lines +193 to +202
.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,
Comment on lines +22 to +24
<span class='mergeable-title'>This branch has no conflicts</span>
<span class='mergeable-subtitle'>Merging can be performed
automatically</span>
Comment on lines +20 to +25
<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`.
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