chore: finish the 3 remaining open issues (#93 move-snapshot, #62 cap, #109 ru-RU i18n) #117

Merged
Ghost merged 3 commits from chore/finish-open-issues into develop 2026-06-21 14:27:03 +03:00

Завершение оставшихся открытых issue

Из 38 открытых issue 35 уже были реализованы в develop (проверено по коду, не только по сообщениям коммитов) и закрыты напрямую как already-done/superseded. Эта ветка добавляет 3 недостающие/частичные:

Issue Что сделано Commit
#93 Option 2: единый снапшот move-аудитории (один fetchSockets + один getUserIdsWithPageAccess), убрано окно гонки restricted-move; удалены emitToAuthorizedUsers/emitDeleteToUnauthorized c3161a05
#62 Понижен дефолтный per-workspace cap share-AI 300 → 100 (fail-closed уже был) 6397b500
#109 Наполнен ru-RU полным набором строк AI-чата (24 ключа) + зафиксирована политика локализации в i18n.ts e12ddaa2

Тесты: ws сьюты 34/34, public-share-chat 52/52; ревью пройдено.

Closes #93
Closes #62
Closes #109

## Завершение оставшихся открытых issue Из 38 открытых issue **35 уже были реализованы** в `develop` (проверено по коду, не только по сообщениям коммитов) и закрыты напрямую как already-done/superseded. Эта ветка добавляет **3** недостающие/частичные: | Issue | Что сделано | Commit | |------|-------------|--------| | #93 | Option 2: единый снапшот move-аудитории (один fetchSockets + один getUserIdsWithPageAccess), убрано окно гонки restricted-move; удалены emitToAuthorizedUsers/emitDeleteToUnauthorized | c3161a05 | | #62 | Понижен дефолтный per-workspace cap share-AI 300 → 100 (fail-closed уже был) | 6397b500 | | #109 | Наполнен ru-RU полным набором строк AI-чата (24 ключа) + зафиксирована политика локализации в i18n.ts | e12ddaa2 | Тесты: `ws` сьюты 34/34, `public-share-chat` 52/52; ревью пройдено. Closes #93 Closes #62 Closes #109
Ghost added 3 commits 2026-06-21 14:25:21 +03:00
Implements Option 2 of #93. The restricted branch of broadcastPageMoved
previously resolved its audience twice — emitToAuthorizedUsers and
emitDeleteToUnauthorized each ran an independent fetchSockets +
getUserIdsWithPageAccess — leaving a race window between the two snapshots
where a socket could receive both the move and the delete (leak) or neither
(lost compensating delete).

- ws.service.ts: add emitMoveWithRestrictionSplit() that takes ONE socket
  snapshot and ONE authorization resolution, then partitions the room:
  authorized users get the moveTreeNode, everyone else (unauthorized +
  anonymous) get the compensating deleteTreeNode. Disjoint + complete by
  construction. Remove the now-unused emitToAuthorizedUsers /
  emitDeleteToUnauthorized; keep private broadcastToAuthorizedUsers (still
  used by emitRestrictedAwareToSpace).
- ws-tree.service.ts: broadcastPageMoved restricted branch now drives move +
  delete from the single method.
- specs: assert the single method is used and that fetchSockets /
  getUserIdsWithPageAccess are each called exactly once (single snapshot);
  re-route ws-service.spec to emitTreeEvent after the method removal.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The fail-closed limiter behavior (#62 primary item) already shipped; this
finishes the issue by lowering the default hourly per-workspace cap from 300
to 100 to better fit real anonymous-assistant load. Still overridable via
SHARE_AI_WORKSPACE_MAX_PER_HOUR.

- public-share-workspace-limiter.ts: SHARE_AI_WORKSPACE_MAX_PER_WINDOW 300 -> 100.
- .env.example: documented default + example value 300 -> 100.
- public-share-chat.spec.ts: update the default-cap assertion to 100.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ru-RU was missing most AI-chat keys, so the chat/typing widgets rendered
mixed-language (some keys fell back to en-US). Fill the full AI-chat string
set in ru-RU and document the maintenance policy.

- ru-RU/translation.json: add the 24 missing AI-chat keys (labels, typing
  indicator, Ask-AI widget, public-share, error messages); keep the typing
  keys grouped; existing translations untouched.
- i18n.ts: add a policy comment near fallbackLng — en-US is the source of
  truth; en-US + ru-RU are fully maintained; the other 10 locales
  intentionally rely on the en-US fallback until contributed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Ghost merged commit ebfe56a684 into develop 2026-06-21 14:27:03 +03:00
Ghost deleted branch chore/finish-open-issues 2026-06-21 14:27:03 +03:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vvzvlad/gitmost#117