AURORA-1683 сверка в браузере: отступы панели и строки, tasks OpenSpec

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Andrey Epifancev 2026-10-27 00:28:19 +04:00
parent 470851ef19
commit e25dd2e776
3 changed files with 25 additions and 3 deletions

View File

@ -0,0 +1,20 @@
## 1. Данные (arm-core `web/`)
- [x] 1.1 `types/api.ts`: `CommentOut`; `services/api/documents.ts`: `getComments`, `postComment` с типом ответа.
- [x] 1.2 `utils/dates.ts`: `formatMoscowDateTime` + тест.
- [x] 1.3 `widgets/FilesDrawer/documentRows.ts`: `commentsCount` в строке + тесты.
## 2. Экран документа [41]
- [x] 2.1 `widgets/DocumentComments/`: `useDocumentComments`, `CommentsList`, `DocumentCommentsDrawer`.
- [x] 2.2 `layouts/DocumentPage.tsx`: кнопка «Комментарии (N)» и боковая панель; `CommentModal` удалён.
## 3. Панель «Первичные документы» [39-01]
- [x] 3.1 `widgets/DocumentComments/CommentsPopover.tsx`; `widgets/FilesDrawer/FilesList.tsx` — кнопка в колонке действий.
## 4. Проверки
- [x] 4.1 Сценарии в браузере (1600×1000): добавление и перезагрузка, ошибка 403, многострочный и длинный текст, счётчик и
поповер в панели, пустой поповер, клики не открывают документ.
- [x] 4.2 `npm test`, `npm run lint`, `make web-check`, `openspec validate document-comments-ui --strict`.

View File

@ -39,11 +39,12 @@ export function DocumentCommentsDrawer({ documentId, open, onClose, onAdded }: D
<Drawer
title='Комментарии к документу'
placement='right'
width={420}
size={420}
open={open}
onClose={onClose}
footer={
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
// отступ 28: счётчик символов showCount рисуется под полем и наезжал бы на кнопку
<div style={{ display: 'flex', flexDirection: 'column', gap: 28 }}>
<Input.TextArea
value={text}
onChange={(e) => setText(e.target.value)}

View File

@ -139,7 +139,8 @@ export function FilesList({
title: '',
dataIndex: 'action',
render: (_, r) => (
<div style={{ display: 'flex', gap: 8 }}>
// кнопка с числом комментариев шире пустой — прижимаем вправо, чтобы «Удалить» стояла столбцом
<div style={{ display: 'flex', gap: 8, justifyContent: 'flex-end' }}>
{r.documentId && <CommentsPopover documentId={r.documentId} fileName={r.name} count={r.commentsCount} />}
<Button
icon={<DeleteOutlined />}