fix(i18n): anchor the literal guard's exclusions so they stop swallowing copy (#2288)

Co-authored-by: Kandev Agent <agent@kandev.dev>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
João Salavisa
2026-08-05 19:36:27 +02:00
committed by GitHub
parent fef76fda57
commit 24c3b594ce
15 changed files with 260 additions and 5 deletions
@@ -396,6 +396,9 @@ function ReviewWatchSection({ workspaceId }: { workspaceId: string }) {
}}
onUpdate={async (id, req) => {
const watch = watches.find((item) => item.id === id);
// Unreachable-invariant guard: the dialog only ever calls onUpdate for
// a row it was opened from. A developer diagnostic, not user copy.
// eslint-disable-next-line i18next/no-literal-string -- invariant message
if (!watch) throw new Error("review watch not found");
await update(id, watch.workspace_id, req);
toast({ description: t("github:reviewWatchUpdated"), variant: "success" });
@@ -499,6 +502,8 @@ function IssueWatchSection({ workspaceId }: { workspaceId: string }) {
}}
onUpdate={async (id, req) => {
const watch = issueActions.watches.find((item) => item.id === id);
// Unreachable-invariant guard, as above. Developer diagnostic.
// eslint-disable-next-line i18next/no-literal-string -- invariant message
if (!watch) throw new Error("issue watch not found");
await issueActions.update(id, watch.workspace_id, req);
toast({ description: t("github:issueWatchUpdated"), variant: "success" });