fix(ui): remove duplicate create-task loading status (#10756)
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - Operators create tasks from the board UI. > - The create form must show clear progress while it submits. > - The form showed the same pending state twice. > - One copy also used the old term "issue" instead of the UI term "task." > - This pull request keeps the pending state in the submit button and removes the duplicate status. > - The benefit is a clearer form with consistent task language. ## Linked Issues or Issue Description No matching public GitHub issue exists for this focused UI bug. **What happened?** The create-task form showed `Creating issue...` beside a submit button that already showed `Creating...`. A low-trust notice in the same form also used the old UI term `issue`. **Expected behavior** The submit button shows the pending state once. Visible UI copy uses `task` for the work object. **Steps to reproduce** 1. Open the create-task dialog. 2. Enter a task title. 3. Select **Create Task**. 4. Observe the duplicate loading status beside the pending button. **Paperclip version or commit** Reproduced from upstream `master` at `2c90cf0f2c60d3851880eca3c643c01313af9ffd`. **Deployment mode** Local development build. ## What Changed - Removed the duplicate loading status beside the create-task submit button. - Kept inline create errors in the dialog footer. - Changed the low-trust notice from `issue` to `task`. - Added a regression test for the single pending-state presentation and `aria-busy` state. ## Verification - `cd ui && pnpm exec vitest run src/components/NewIssueDialog.test.tsx` — 24 tests passed. - `pnpm --filter @paperclipai/ui typecheck` — passed. - `pnpm check:token-gates` — passed. ## Risks - Low risk. The change only removes duplicate pending copy and updates one UI term. - The regression test keeps the submit button pending indefinitely to verify its accessible loading state. > For core feature work, check [`ROADMAP.md`](ROADMAP.md) first and discuss it in `#dev` before opening the PR. Feature PRs that overlap with planned core work may need to be redirected — check the roadmap first. See `CONTRIBUTING.md`. ## Model Used - OpenAI Codex, model ID `gpt-5`. The runtime did not expose the context-window size. The session used reasoning, repository tools, and code execution. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [x] All Paperclip CI gates are green - [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge Co-authored-by: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
8e7f1c03eb
commit
2a90933433
|
|
@ -797,6 +797,29 @@ describe("NewIssueDialog", () => {
|
|||
act(() => root.unmount());
|
||||
});
|
||||
|
||||
it("shows the create-task loading state only in the submit button", async () => {
|
||||
mockIssuesApi.create.mockReturnValue(new Promise(() => undefined));
|
||||
dialogState.newIssueDefaults = { title: "Pending task" };
|
||||
|
||||
const { root } = renderDialog(container);
|
||||
await flush();
|
||||
|
||||
const submitButton = Array.from(container.querySelectorAll("button"))
|
||||
.find((button) => button.textContent?.includes("Create Task"));
|
||||
expect(submitButton).not.toBeUndefined();
|
||||
|
||||
await act(async () => {
|
||||
submitButton!.dispatchEvent(new MouseEvent("click", { bubbles: true }));
|
||||
});
|
||||
await flush();
|
||||
|
||||
expect(submitButton?.textContent).toContain("Creating...");
|
||||
expect(submitButton?.getAttribute("aria-busy")).toBe("true");
|
||||
expect(container.textContent).not.toContain("Creating issue");
|
||||
|
||||
act(() => root.unmount());
|
||||
});
|
||||
|
||||
it("submits Chinese, Japanese, and Hindi issue text without normalization", async () => {
|
||||
const title = "验证中文任务";
|
||||
const description = [
|
||||
|
|
|
|||
|
|
@ -2242,7 +2242,7 @@ export function NewIssueDialog() {
|
|||
>
|
||||
<ShieldAlert className="mt-0.5 h-3.5 w-3.5 shrink-0 text-amber-600 dark:text-amber-300" />
|
||||
<span className="leading-snug">
|
||||
Low-trust review agent. It can only act inside its assigned review boundary; issue, project, or run policy defines the concrete scope.
|
||||
Low-trust review agent. It can only act inside its assigned review boundary; task, project, or run policy defines the concrete scope.
|
||||
</span>
|
||||
</div>
|
||||
) : null}
|
||||
|
|
@ -2259,16 +2259,11 @@ export function NewIssueDialog() {
|
|||
Discard Draft
|
||||
</Button>
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="min-h-5 text-right">
|
||||
{createIssue.isPending ? (
|
||||
<span className="inline-flex items-center gap-1.5 text-xs font-medium text-muted-foreground">
|
||||
<Loader2 className="h-3 w-3 animate-spin" />
|
||||
Creating issue...
|
||||
</span>
|
||||
) : createIssue.isError ? (
|
||||
{createIssue.isError ? (
|
||||
<div className="min-h-5 text-right">
|
||||
<span className="text-xs text-destructive">{createIssueErrorMessage}</span>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
<Button
|
||||
size="sm"
|
||||
className="min-w-(--sz-8_5rem) disabled:opacity-100"
|
||||
|
|
|
|||
Loading…
Reference in New Issue