Skip to content

improvement(ui): share knowledge upload rows - #8070

Open
BillLeoutsakosvl346 wants to merge 2 commits into
stagingfrom
codex/control-fix-knowledge-upload-rows
Open

BillLeoutsakosvl346 wants to merge 2 commits into
stagingfrom
codex/control-fix-knowledge-upload-rows

Conversation

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor

Summary

  • Share selected-file rows between knowledge creation and document uploads.
  • Preserve file names and sizes, error borders, loading indicators, disabled removal and optional retry actions.

Type of Change

  • Refactor / maintainability improvement

Testing

  • Full workspace type checks, lint, repository audits (including import and API validation), generators and docs checks pass.
  • External source comparison confirms caller logic and content are unchanged.
  • Before/after browser fixtures cover the changed component's styling and interactions. Original and extracted controls have matching computed styles. These are isolated fixtures, not full authenticated product flows.
  • Relevant existing tests pass. No landing-page changes or audit tooling included.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 22, 2026 5:53pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge, with only a non-blocking visual regression in upload-row action sizing.

Findings

  1. P2 Idle Controls Grow Taller ▶

Summary

This PR extracts the selected-file presentation used by knowledge-base creation and document uploads into a shared KnowledgeUploadRow component.

  • Preserves file names, formatted sizes, error presentation, processing indicators, and removal behavior.
  • Supports the retry action required by document uploads.
  • Introduces a small control-sizing regression in the extracted row.

Reviews (2) · Last reviewed commit: "improvement(ui): use standard knowledge ..."

@BillLeoutsakosvl346

BillLeoutsakosvl346 commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Before / after visual comparison

Knowledge upload rows share the row shell and action layout. The failed-upload example shows the retained red border/text and retry/remove actions.

Left = before; right = after.

Rendered component fixtures with application CSS and local data, rather than authenticated product-page screenshots. These are representative visual examples, not end-to-end behavior coverage.

Current PR head checked at posting: 70175ba788.

The images in this section show the row extraction at 70175ba788. The current head, fc12400269, also includes the icon-button change illustrated below.

Before and after: light upload error

Additional theme/state comparisons

Before and after: dark upload error

Representative code change

Both knowledge upload flows now render the same KnowledgeUploadRow; each caller still supplies its file state, retry action, and removal action.

Before

<div
  className={cn(
    'flex items-center gap-2 rounded-sm border p-2',
    isFailed && !isRetrying && 'border-[var(--text-error)]'
  )}
>

After

<KnowledgeUploadRow
  key={`${file.name}-${file.size}`}
  name={file.name}
  size={formatFileSize(file.size)}
  error={isFailed && !isRetrying}
  processing={isProcessing}
  disabled={isUploading}
  onRemove={() => removeFile(index)}
  onRetry={isFailed ? () => handleRetryFile(index) : undefined}
/>

Follow-up icon-button change in the current head

Commit fc12400269 adopts EMCN's standard icon size for the retry and remove controls inside the extracted row. The component source matches the reviewed icon-button implementation in #8135. That visual comparison renders the actual row before and after this second change in light and dark, including hover, disabled, ready, error, and processing states. The hit areas become 20px instead of 16px; ready and error rows become 38px instead of 36px. This is an intentional visible change, so the earlier row-extraction images alone do not represent the final appearance.

Before

<Button variant='ghost' className='size-4 p-0' onClick={onRetry} disabled={disabled}>
  <RefreshCw className='size-3' />
</Button>

After

<Button variant='ghost' size='icon' onClick={onRetry} disabled={disabled}>
  <RefreshCw className='size-3' />
</Button>

Knowledge upload row icon buttons, matched before and after

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptileai review this PR

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

This branch was previously deployed

1 inactive deployment
Preview — fc124002 Deployed Sep 22, 2026 by vercel[bot]
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