12ed3a0332
Part 1 (#542): add an inline Undo (reopen) button to the resolve success toast in useResolveCommentMutation. Undo re-invokes the same mutation via a self-ref (declared before useMutation, read at click time — no cycle) and clears the inline comment mark through an editor ref (survives the originating CommentListItem unmounting). A closured `done` flag guards a fast double-click (notifications.hide is async). Reopen keeps the plain toast (no Undo). onError gains a terminal 404 branch: drop the comment from the cache and unsetComment its orphaned mark (no rollback → no phantom in Resolved, neutral "Comment no longer exists"). The generic-failure copy is now directional (resolve vs. re-open). Autoclose policy const RESOLVE_UNDO_AUTOCLOSE_MS=10000. Part 2: sort the Resolved tab by resolvedAt DESC via an exported sortResolvedByResolvedAt helper; coerce with new Date(...) because resolvedAt is an ISO string at runtime (Date only in the optimistic window). i18n: add "Failed to re-open comment" and "Comment no longer exists" to en-US/ru-RU. Tests: 6 resolve-undo cases + 4 sort cases. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level
parserOptionsproperty like this:
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
- Replace
plugin:@typescript-eslint/recommendedtoplugin:@typescript-eslint/recommended-type-checkedorplugin:@typescript-eslint/strict-type-checked - Optionally add
plugin:@typescript-eslint/stylistic-type-checked - Install eslint-plugin-react and add
plugin:react/recommended&plugin:react/jsx-runtimeto theextendslist