Skip to content

fix(server): deprecate the i18n option the server never reads - #161

Merged
anurag629 merged 2 commits into
codercops:devfrom
prakashNalla:fix/deprecate-server-i18n
Oct 19, 2026
Merged

anurag629 merged 2 commits into
codercops:devfrom
prakashNalla:fix/deprecate-server-i18n

Conversation

@prakashNalla

Copy link
Copy Markdown
Contributor

What does this change?

i18n in ChatCopsServerConfig now has a @deprecated note pointing to the widget's strings option, and createChatHandler logs one console.warn when it's set (once per handler, not per request). The type still accepts it. I took the i18n block out of the setup example, marked it deprecated in the interface on that page, and updated the line about it in widget/i18n.mdx (on top of #151).

Closes #154

How I tested this

  • pnpm -r build, pnpm -r typecheck and pnpm test (29 files / 267 tests pass), on Node v22.23.3 with pnpm 9.15.0
  • Added 2 tests in handler.test.ts: one warning when i18n is set, none when it isn't. The first fails without the change.

AI assistance

Claude helped me understand the issue

Checklist

  • This PR targets dev
  • I was assigned the linked issue
  • pnpm -r build, pnpm test and pnpm -r typecheck pass locally
  • Tests added or updated where it makes sense
  • For a bug fix: the new test fails without my change
  • Changeset added (pnpm changeset) if this changes core, widget or server
  • Docs updated if behavior or options changed

@anurag629 anurag629 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @prakashNalla, this covers everything in #154. On top of current dev the build, typecheck and all 274 tests pass, and the warning test fails with dev's handler.ts. I updated the branch with dev so it could merge. Merging.

@anurag629 anurag629 added the hacktoberfest-accepted PR counts for Hacktoberfest label Oct 19, 2026
@anurag629
anurag629 merged commit 0550fc3 into codercops:dev Oct 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted PR counts for Hacktoberfest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate the server's i18n option, which nothing reads

2 participants