Skip to content

Fix Chat dock tasks i18n call that breaks tsc - #42

Merged
XYAIStudio merged 1 commit into
mainfrom
cursor/fix-chat-dock-tasks-i18n-d0b4
Sep 17, 2026
Merged

XYAIStudio merged 1 commit into
mainfrom
cursor/fix-chat-dock-tasks-i18n-d0b4

Conversation

@XYAIStudio

@XYAIStudio XYAIStudio commented Sep 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

ChatDockTasksContent passed the i18n t function as apiErrorMessage's fallback string. That is a TFunction, so tsc -b / make build-frontend fails:

src/pages/Chat/components/ChatDockTasksContent.tsx(40,55): error TS2345:
Argument of type 'TFunction<"translation", undefined>' is not assignable to parameter of type 'string'.

This blocks FreeOS Desktop Package (Windows packaging).

Change

Call apiErrorMessage(err, fallback, t) like every other dashboard site:

  • fallback: t("chat.rightRail.tasksLoadFailed", "加载任务失败")
  • translator: t

Added matching chat.rightRail.tasksLoadFailed keys in en.json / zh.json. Grep found no other apiErrorMessage(..., t) siblings.

Target branch

Type of change

  • Bug fix
  • Release / hotfix

Test plan

  • cd dashboard && npx tsc --noEmit — pass
  • cd dashboard && npx tsc -b — pass
  • cd dashboard && npm run build (tsc -b && vite build) — pass
  • chat.rightRail en/zh key trees match (tasksLoadFailed present in both)
  • GitHub CI (Linux + Windows Python jobs)

make build-frontend locally is npm ci + npm run build; the typecheck/build half is already green. Desktop Package CI only runs on desktop/** / openxyos/** path filters, so this dashboard-only PR does not trigger that workflow.

Open in Web Open in Cursor 

apiErrorMessage expects a fallback string then optional t; passing t as the
second argument failed dashboard typecheck and blocked Windows packaging.

Co-authored-by: XYAI Labs <haoboy8@gmail.com>
@XYAIStudio
XYAIStudio marked this pull request as ready for review September 17, 2026 06:46
@XYAIStudio
XYAIStudio merged commit 5d45344 into main Sep 17, 2026
5 checks passed
@XYAIStudio
XYAIStudio deleted the cursor/fix-chat-dock-tasks-i18n-d0b4 branch September 17, 2026 07:16
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.

2 participants