Skip to content

refactor(paintings): use inline artboard loading bar#16754

Merged
0xfullex merged 3 commits into
mainfrom
codex/artboard-inline-loading-bar
Jul 6, 2026
Merged

refactor(paintings): use inline artboard loading bar#16754
0xfullex merged 3 commits into
mainfrom
codex/artboard-inline-loading-bar

Conversation

@AtomsH4

@AtomsH4 AtomsH4 commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

🚨 Branch strategy — read before opening this PR

The v2 refactor has merged into main, so main is the default branch for active development (v1 and v2 code currently coexist there — expect large, breaking changes).

  • Active development (features, refactors, optimizations, fixes for the current codebase) → target main (the default base).
  • v1 maintenance (hotfixes and subsequent v1 releases) → branch from and target v1, not main.

A v1 fix does not auto-carry to main: if the same bug exists on main, open a separate forward-port PR targeting main. Before touching subsystems being replaced, read docs/references/data/ and watch for @deprecated markers — they flag code being deleted.

What this PR does

Before this PR:
The painting artboard showed a centered loading card with a spinning motion animation while image generation was running.

After this PR:
The painting artboard shows a compact inline status panel with an indeterminate progress bar, keeps the cancel action available, and updates the generation copy to tell users not to leave the page.

Fixes # N/A

Why we need it and why it was done in this way

The following tradeoffs were made:

  • Kept the loading state local to Artboard because this is a single painting-specific UI state.
  • Reused existing UI primitives and CSS animation utilities instead of adding a new shared loading component.
  • Removed the motion usage from this component because the progress indicator no longer needs a JS-driven spinner.

The following alternatives were considered:

  • Keeping the spinner card and only changing the copy, but that preserved the heavier overlay treatment.
  • Adding a generic loading component, but the current need is narrow and does not justify a shared abstraction.

Links to places where the discussion took place: N/A

Breaking changes

If this PR introduces breaking changes, please describe the changes and the impact on users.

N/A

Special notes for your reviewer

Validation:

  • pnpm lint
  • pnpm docs:check-links
  • pnpm exec vitest run --silent --project renderer src/renderer/pages/paintings/components/__tests__/Artboard.test.tsx

Full-suite note: pnpm test was run before the final rebase onto the latest origin/main; it failed on the unrelated existing AgentComposer > opens the active session agent edit dialog from the toolbar trigger while keeping the model selector inline test. The targeted Artboard test was rerun and passes on the current branch.

Checklist

This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

  • Branch: This PR targets the correct branch — main for active development, v1 for v1 maintenance fixes
  • PR: The PR description is expressive enough and will help future contributors
  • Code: Write code that humans can understand and Keep it simple
  • Refactor: You have left the code cleaner than you found it (Boy Scout Rule)
  • Upgrade: Impact of this change on upgrade flows was considered and addressed if required
  • Documentation: A user-guide update was considered and is present (link) or not required. Check this only when the PR introduces or changes a user-facing feature or behavior.
  • Self-review: I have reviewed my own code (e.g., via /gh-pr-review, gh pr diff, or GitHub UI) before requesting review from others

Release note

The painting artboard now shows a compact inline progress bar while image generation is running and tells users not to leave the page.

AtomsH4 added 2 commits July 6, 2026 11:44
Signed-off-by: gujiaming <52187003+AtomsH4@users.noreply.github.com>
Signed-off-by: gujiaming <52187003+AtomsH4@users.noreply.github.com>
@AtomsH4 AtomsH4 requested review from a team and Copilot July 6, 2026 03:55

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.

Pull request overview

Refactors the paintings Artboard loading UI from a centered spinner card to a compact inline status panel with an indeterminate progress bar, while keeping the cancel action available and updating the “generating” copy across locales.

Changes:

  • Replace the motion-based spinner card with an inline status panel + progressbar in Artboard.
  • Update the Artboard renderer test to cover the new loading UI.
  • Update i18n copy for paintings.generating (en-us, zh-cn, zh-tw).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/renderer/pages/paintings/components/Artboard.tsx Replaces the centered spinner card with an inline status + progress bar and removes motion usage.
src/renderer/pages/paintings/components/tests/Artboard.test.tsx Adds coverage for the new inline loading state + cancel action.
src/renderer/i18n/locales/zh-tw.json Updates paintings.generating copy to the new guidance text.
src/renderer/i18n/locales/zh-cn.json Updates paintings.generating copy to the new guidance text.
src/renderer/i18n/locales/en-us.json Updates paintings.generating copy to the new guidance text.

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

Comment thread src/renderer/pages/paintings/components/Artboard.tsx
Comment thread src/renderer/pages/paintings/components/Artboard.tsx
Comment thread src/renderer/pages/paintings/components/__tests__/Artboard.test.tsx
Comment thread src/renderer/pages/paintings/components/__tests__/Artboard.test.tsx
@kangfenmao kangfenmao requested a review from Copilot July 6, 2026 05:05
@kangfenmao kangfenmao added the ready-to-merge This PR has sufficient reviewer approvals but is awaiting code owner approval. label Jul 6, 2026

This comment was marked as low quality.

@0xfullex 0xfullex merged commit f750d50 into main Jul 6, 2026
7 checks passed
@0xfullex 0xfullex deleted the codex/artboard-inline-loading-bar branch July 6, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has sufficient reviewer approvals but is awaiting code owner approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants