revdeck 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +12 -2
- package/README.ru.md +13 -4
- package/dist/cli.js +24 -16
- package/dist/cli.js.map +2 -2
- package/dist/daemon.js +20 -11
- package/dist/daemon.js.map +2 -2
- package/dist/mcp.js +5 -4
- package/dist/mcp.js.map +2 -2
- package/dist/ui/assets/{index-DWJc4ebO.css → index-C4ko2Kho.css} +1 -1
- package/dist/ui/assets/index-CXNMvRvo.js +10 -0
- package/dist/ui/index.html +2 -2
- package/docs/architecture.md +2 -1
- package/docs/configuration.md +9 -0
- package/docs/ru/architecture.md +2 -1
- package/docs/ru/configuration.md +9 -0
- package/package.json +1 -1
- package/dist/ui/assets/index-DY3svuMy.js +0 -10
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,30 @@ All notable changes to this project are documented here. The format is based on
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.3.0] - 2026-11-12
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- UI: MR/PR description on the Overview; an **Open review** dialog (`o`) that opens a number or URL
|
|
14
|
+
from the browser; deep links to threads, findings and diff lines with working Back/Forward; a file
|
|
15
|
+
filter, per-review "viewed" checkboxes and previous/next file buttons in the diff.
|
|
16
|
+
- Markdown editor: paste and drag-and-drop image/video uploads, and `Ctrl/Cmd+B`, `Ctrl/Cmd+I`,
|
|
17
|
+
`Ctrl/Cmd+K` formatting shortcuts.
|
|
18
|
+
- Mobile sidebar as an overlay with a backdrop; it is closed by default on narrow screens.
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- Header actions wrap on mobile instead of squeezing the MR title.
|
|
23
|
+
|
|
24
|
+
## [0.2.3] - 2026-11-12
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- Collapsible UI sidebar: the header button or `s` hides/shows it, and the choice is stored in
|
|
29
|
+
`localStorage`.
|
|
30
|
+
- `rules.maxDocumentBytes` and `rules.maxTotalBytes` in `.revdeck.yml`. `0` (the new default) means no
|
|
31
|
+
limit, so all rule documents are loaded; set a positive value to cap the context.
|
|
32
|
+
|
|
9
33
|
## [0.2.2] - 2026-11-12
|
|
10
34
|
|
|
11
35
|
### Added
|
package/README.md
CHANGED
|
@@ -112,11 +112,18 @@ Russian READMEs live in this repository; translation fixes are welcome.
|
|
|
112
112
|
| `revdeck checks <N> [--run --yes]` | project checks |
|
|
113
113
|
| `revdeck export/import <N>` | legacy file exchange |
|
|
114
114
|
| `revdeck ui [N]` | local web UI |
|
|
115
|
-
| `revdeck daemon <start\|stop\|status\|logs\|install>` | daemon lifecycle |
|
|
115
|
+
| `revdeck daemon <start\|stop\|restart\|status\|logs\|install\|uninstall>` | daemon lifecycle |
|
|
116
116
|
| `revdeck mcp` | MCP server over stdio |
|
|
117
117
|
|
|
118
118
|
Common flags: `--json`, `--root`, `--review`, `--platform`, `--project`, `--host`, `--lang ru|en`.
|
|
119
119
|
|
|
120
|
+
UI shortcuts: `1`–`5` switch tabs, `o` opens a review, `r` refreshes, `s` hides/shows the
|
|
121
|
+
sidebar, `p` opens publishing, `?` opens the command palette. The sidebar choice is stored in
|
|
122
|
+
`localStorage`.
|
|
123
|
+
|
|
124
|
+
The UI shows the MR/PR description, supports deep links to threads, findings and diff lines (with
|
|
125
|
+
working browser Back/Forward), and keeps a per-review "viewed" state and file filter in the diff.
|
|
126
|
+
|
|
120
127
|
## Attachments
|
|
121
128
|
|
|
122
129
|
The UI has an **Attach** button next to reply, finding and line-comment editors; the CLI equivalent is
|
|
@@ -201,6 +208,8 @@ rules:
|
|
|
201
208
|
- match: "src/state/**"
|
|
202
209
|
docs: [docs/StateManagement.md]
|
|
203
210
|
ignore: ["**/generated/**"]
|
|
211
|
+
maxDocumentBytes: 0 # 0 = no limit
|
|
212
|
+
maxTotalBytes: 0 # 0 = no limit
|
|
204
213
|
checks:
|
|
205
214
|
- id: lint
|
|
206
215
|
argv: [npm, run, lint]
|
|
@@ -261,7 +270,8 @@ Provider tests use recorded CLI responses and need no network. See [CONTRIBUTING
|
|
|
261
270
|
- Publishing uses regular comments; native drafts (GitLab draft notes, GitHub pending review) are not
|
|
262
271
|
used yet, though the provider interface is ready.
|
|
263
272
|
- Project checks are planned by the agent; running them requires `revdeck checks --run --yes`.
|
|
264
|
-
- The UI
|
|
273
|
+
- The UI opens a review from the **Open review** dialog; the working-copy root is required so the daemon
|
|
274
|
+
can read `.revdeck.yml`.
|
|
265
275
|
- Thread resolution is in the thread card; reactions are available on thread notes in the UI and through
|
|
266
276
|
`revdeck react`.
|
|
267
277
|
- GitHub has no public attachment API: the Attach button is disabled there; uploads work in GitLab.
|
package/README.ru.md
CHANGED
|
@@ -26,8 +26,7 @@
|
|
|
26
26
|
дочерних процессов. Агент в песочнице получает только RPC и не видит ни токена, ни конфигурации
|
|
27
27
|
платформы.
|
|
28
28
|
- **GitLab и GitHub.** Одна модель: MR/PR, треды, diff, резолв, реакции, комментарии к строкам, вложения.
|
|
29
|
-
- **Несколько ревью.** Демон хранит открытые ревью в SQLite; UI — очередь с
|
|
30
|
-
клавишами.
|
|
29
|
+
- **Несколько ревью.** Демон хранит открытые ревью в SQLite; UI — очередь с горячими клавишами.
|
|
31
30
|
|
|
32
31
|
## Установка
|
|
33
32
|
|
|
@@ -98,11 +97,18 @@ revdeck ui # ссылка на локальный интерфейс
|
|
|
98
97
|
| `revdeck checks <N> [--run --yes]` | проверки проекта |
|
|
99
98
|
| `revdeck export/import <N>` | обмен с файловым форматом |
|
|
100
99
|
| `revdeck ui [N]` | локальный интерфейс |
|
|
101
|
-
| `revdeck daemon <start│stop│status│logs│install>` | управление демоном |
|
|
100
|
+
| `revdeck daemon <start│stop│restart│status│logs│install│uninstall>` | управление демоном |
|
|
102
101
|
| `revdeck mcp` | MCP-сервер (stdio) |
|
|
103
102
|
|
|
104
103
|
Общие флаги: `--json`, `--root`, `--review`, `--platform`, `--project`, `--host`, `--lang ru|en`.
|
|
105
104
|
|
|
105
|
+
Горячие клавиши UI: `1`–`5` переключают вкладки, `o` открывает ревью, `r` обновляет, `s`
|
|
106
|
+
скрывает/показывает сайдбар, `p` открывает публикацию, `?` — палитру команд. Выбор сайдбара
|
|
107
|
+
запоминается в `localStorage`.
|
|
108
|
+
|
|
109
|
+
UI показывает описание MR/PR, поддерживает deep links на треды, замечания и строки diff (с рабочей
|
|
110
|
+
кнопкой «назад»), а в diff — фильтр файлов и отметку «просмотрено» для каждого ревью.
|
|
111
|
+
|
|
106
112
|
## Вложения
|
|
107
113
|
|
|
108
114
|
В UI рядом с редакторами ответа, замечания и комментария к строке есть кнопка **Прикрепить**; в CLI —
|
|
@@ -189,6 +195,8 @@ rules:
|
|
|
189
195
|
- match: "docs/**"
|
|
190
196
|
docs: [AGENTS.md#Размещение-технических-знаний]
|
|
191
197
|
ignore: ["**/generated/**"]
|
|
198
|
+
maxDocumentBytes: 0 # 0 = без лимита
|
|
199
|
+
maxTotalBytes: 0 # 0 = без лимита
|
|
192
200
|
checks:
|
|
193
201
|
- id: lint
|
|
194
202
|
argv: [npm, run, lint]
|
|
@@ -248,7 +256,8 @@ npm run build # dist/cli.js, dist/daemon.js, dist/mcp.js, dist/ui
|
|
|
248
256
|
- Публикация идёт обычными комментариями; native drafts (GitLab draft notes, GitHub pending review)
|
|
249
257
|
ещё не используются, хотя провайдеры к этому готовы.
|
|
250
258
|
- Проверки проекта агент только планирует; запуск — `revdeck checks --run --yes`.
|
|
251
|
-
- UI
|
|
259
|
+
- UI открывает ревью через диалог **Открыть ревью**; нужен корень рабочей копии, чтобы демон
|
|
260
|
+
прочитал `.revdeck.yml`.
|
|
252
261
|
- Резолв тредов есть в карточке треда; реакции доступны на комментариях тредов в UI и через
|
|
253
262
|
`revdeck react`.
|
|
254
263
|
- У GitHub нет публичного API загрузки вложений: кнопка «Прикрепить» там отключена; загрузка работает
|
package/dist/cli.js
CHANGED
|
@@ -168,7 +168,7 @@ var VERSION;
|
|
|
168
168
|
var init_version = __esm({
|
|
169
169
|
"src/version.ts"() {
|
|
170
170
|
"use strict";
|
|
171
|
-
VERSION = "0.
|
|
171
|
+
VERSION = "0.3.0";
|
|
172
172
|
}
|
|
173
173
|
});
|
|
174
174
|
|
|
@@ -442,7 +442,8 @@ var init_format = __esm({
|
|
|
442
442
|
|
|
443
443
|
// src/context.ts
|
|
444
444
|
function renderContext(review, rules2, options = {}) {
|
|
445
|
-
const
|
|
445
|
+
const maxBytes = options.maxBytes ?? 2e5;
|
|
446
|
+
const limit = maxBytes > 0 ? maxBytes : Number.POSITIVE_INFINITY;
|
|
446
447
|
const language = options.language ?? rules2.language ?? "en";
|
|
447
448
|
const t = (ru, en) => language === "ru" ? ru : en;
|
|
448
449
|
const lines = [];
|
|
@@ -561,7 +562,7 @@ function renderContext(review, rules2, options = {}) {
|
|
|
561
562
|
)
|
|
562
563
|
);
|
|
563
564
|
const text = lines.join("\n");
|
|
564
|
-
return text.length > limit ? `${text.slice(0, limit)}
|
|
565
|
+
return Number.isFinite(limit) && text.length > limit ? `${text.slice(0, limit)}
|
|
565
566
|
|
|
566
567
|
[${t("\u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442 \u043E\u0431\u0440\u0435\u0437\u0430\u043D", "context truncated")}: ${text.length} > ${limit} ${t("\u0431\u0430\u0439\u0442", "bytes")}]` : text;
|
|
567
568
|
}
|
|
@@ -757,7 +758,7 @@ Next: revdeck_context(review="${result.review.id}").`, { reviewId: result.review
|
|
|
757
758
|
try {
|
|
758
759
|
const { review: view } = await call("reviews.get", { review, refresh: refresh === true });
|
|
759
760
|
const { rules: rules2 } = await call("rules.get", { review });
|
|
760
|
-
let text = renderContext(view, rules2, { maxBytes: max_bytes ?? 2e5, language: rules2.language });
|
|
761
|
+
let text = renderContext(view, rules2, { maxBytes: max_bytes ?? rules2.maxBytes ?? 2e5, language: rules2.language });
|
|
761
762
|
if (file) {
|
|
762
763
|
const { file: diff2 } = await call("diff.get", {
|
|
763
764
|
review,
|
|
@@ -1218,7 +1219,11 @@ var reviewConfigSchema = z.object({
|
|
|
1218
1219
|
})
|
|
1219
1220
|
).default([]),
|
|
1220
1221
|
/** Пути, которые не ревьюятся (сгенерированный код и т.п.). */
|
|
1221
|
-
ignore: z.array(z.string().min(1)).default([])
|
|
1222
|
+
ignore: z.array(z.string().min(1)).default([]),
|
|
1223
|
+
/** 0 — без ограничения; иначе документ обрезается до этого размера. */
|
|
1224
|
+
maxDocumentBytes: z.number().int().nonnegative().default(0),
|
|
1225
|
+
/** 0 — без ограничения; иначе общий контекст правил обрезается. */
|
|
1226
|
+
maxTotalBytes: z.number().int().nonnegative().default(0)
|
|
1222
1227
|
}).prefault({}),
|
|
1223
1228
|
checks: z.array(
|
|
1224
1229
|
z.object({
|
|
@@ -1302,8 +1307,7 @@ import path3 from "node:path";
|
|
|
1302
1307
|
import { existsSync as existsSync3 } from "node:fs";
|
|
1303
1308
|
init_paths();
|
|
1304
1309
|
init_redact();
|
|
1305
|
-
var
|
|
1306
|
-
var MAX_TOTAL_BYTES = 320 * 1024;
|
|
1310
|
+
var MAX_READ_BYTES = 16 * 1024 * 1024;
|
|
1307
1311
|
async function buildEffectiveRules(options) {
|
|
1308
1312
|
const { root, config: config2, configPath } = options;
|
|
1309
1313
|
const language = options.language ?? "ru";
|
|
@@ -1312,6 +1316,8 @@ async function buildEffectiveRules(options) {
|
|
|
1312
1316
|
const files = options.files.filter((file) => !config2.rules.ignore.some((pattern) => globToRegExp(pattern).test(file)));
|
|
1313
1317
|
const ignored = options.files.length - files.length;
|
|
1314
1318
|
if (ignored > 0) warnings.push(`${ignored} ${t("\u0444\u0430\u0439\u043B(\u043E\u0432) \u0438\u0441\u043A\u043B\u044E\u0447\u0435\u043D\u044B \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u043E\u0439 rules.ignore", "file(s) excluded by rules.ignore")}`);
|
|
1319
|
+
const documentLimit = config2.rules.maxDocumentBytes > 0 ? config2.rules.maxDocumentBytes : Number.POSITIVE_INFINITY;
|
|
1320
|
+
const totalLimit = config2.rules.maxTotalBytes > 0 ? config2.rules.maxTotalBytes : Number.POSITIVE_INFINITY;
|
|
1315
1321
|
const cache = /* @__PURE__ */ new Map();
|
|
1316
1322
|
let totalBytes = 0;
|
|
1317
1323
|
const readDoc = async (selector) => {
|
|
@@ -1331,9 +1337,10 @@ async function buildEffectiveRules(options) {
|
|
|
1331
1337
|
warnings.push(`${t("\u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442", "document")} ${relative} ${t("\u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D", "not found")}`);
|
|
1332
1338
|
} else {
|
|
1333
1339
|
try {
|
|
1334
|
-
const
|
|
1335
|
-
const
|
|
1336
|
-
|
|
1340
|
+
const readLimit = Number.isFinite(documentLimit) ? Math.max(documentLimit * 2, 4096) : MAX_READ_BYTES;
|
|
1341
|
+
const raw = await readTextNoFollow(resolved, readLimit);
|
|
1342
|
+
const truncated = Number.isFinite(documentLimit) && raw.length > documentLimit;
|
|
1343
|
+
cached = { exists: true, text: truncated ? raw.slice(0, documentLimit) : raw, truncated };
|
|
1337
1344
|
} catch (error) {
|
|
1338
1345
|
cached = { exists: false, text: "", truncated: false };
|
|
1339
1346
|
warnings.push(`${relative}: ${redactLine(error)}`);
|
|
@@ -1363,7 +1370,7 @@ async function buildEffectiveRules(options) {
|
|
|
1363
1370
|
}
|
|
1364
1371
|
const documents = [];
|
|
1365
1372
|
for (const doc of docs) {
|
|
1366
|
-
if (totalBytes >
|
|
1373
|
+
if (Number.isFinite(totalLimit) && totalBytes > totalLimit) {
|
|
1367
1374
|
warnings.push(t("\u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442 \u043F\u0440\u0430\u0432\u0438\u043B \u043E\u0431\u0440\u0435\u0437\u0430\u043D: \u043F\u0440\u0435\u0432\u044B\u0448\u0435\u043D \u043B\u0438\u043C\u0438\u0442 \u0440\u0430\u0437\u043C\u0435\u0440\u0430", "rules context truncated: size limit exceeded"));
|
|
1368
1375
|
break;
|
|
1369
1376
|
}
|
|
@@ -1442,6 +1449,7 @@ function normalizeHeading(value) {
|
|
|
1442
1449
|
}
|
|
1443
1450
|
function renderRules(rules2, options = {}) {
|
|
1444
1451
|
const maxBytes = options.maxBytes ?? 2e5;
|
|
1452
|
+
const limit = maxBytes > 0 ? maxBytes : Number.POSITIVE_INFINITY;
|
|
1445
1453
|
const withExcerpts = options.withExcerpts ?? true;
|
|
1446
1454
|
const language = options.language ?? "ru";
|
|
1447
1455
|
const t = (ru, en) => language === "ru" ? ru : en;
|
|
@@ -1466,7 +1474,7 @@ ${rules2.warnings.map((item) => `- ${item}`).join("\n")}`);
|
|
|
1466
1474
|
${doc.excerpt}${doc.truncated ? `
|
|
1467
1475
|
|
|
1468
1476
|
[${t("\u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442 \u043E\u0431\u0440\u0435\u0437\u0430\u043D", "document truncated")}]` : ""}`);
|
|
1469
|
-
if (out.join("\n").length >
|
|
1477
|
+
if (Number.isFinite(limit) && out.join("\n").length > limit) {
|
|
1470
1478
|
out.push(`
|
|
1471
1479
|
[${t("\u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442 \u043F\u0440\u0430\u0432\u0438\u043B \u043E\u0431\u0440\u0435\u0437\u0430\u043D \u043F\u043E \u0440\u0430\u0437\u043C\u0435\u0440\u0443", "rules context truncated by size")}]`);
|
|
1472
1480
|
return out.join("\n");
|
|
@@ -2588,7 +2596,7 @@ var HELP_RU = `revdeck ${VERSION} \u2014 \u0440\u0435\u0432\u044C\u044E GitLab/G
|
|
|
2588
2596
|
revdeck eject \u0443\u0434\u0430\u043B\u0438\u0442\u044C revdeck \u0438\u0437 \u043F\u0440\u043E\u0435\u043A\u0442\u0430 (--yes; --keep-config)
|
|
2589
2597
|
revdeck devcontainer \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C devcontainer \u043A \u0434\u0435\u043C\u043E\u043D\u0443 \u0445\u043E\u0441\u0442\u0430 (--write)
|
|
2590
2598
|
revdeck doctor \u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u043E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u0435 \u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u044B
|
|
2591
|
-
revdeck daemon <start|stop|status|logs|
|
|
2599
|
+
revdeck daemon <start|stop|restart|status|logs|install|uninstall>
|
|
2592
2600
|
revdeck list \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0435 \u0440\u0435\u0432\u044C\u044E (\u043B\u043E\u043A\u0430\u043B\u044C\u043D\u044B\u0439 \u043A\u0435\u0448), --remote \u2014 \u0441 \u043F\u043B\u0430\u0442\u0444\u043E\u0440\u043C\u044B
|
|
2593
2601
|
revdeck open <url|N> \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u0440\u0435\u0432\u044C\u044E \u0438 \u043F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442
|
|
2594
2602
|
revdeck ui [N] \u0441\u0441\u044B\u043B\u043A\u0430 \u043D\u0430 \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u044B\u0439 \u0438\u043D\u0442\u0435\u0440\u0444\u0435\u0439\u0441
|
|
@@ -2617,7 +2625,7 @@ var HELP_EN = `revdeck ${VERSION} \u2014 code review for GitLab/GitHub, for huma
|
|
|
2617
2625
|
revdeck eject remove revdeck from the project (--yes; --keep-config)
|
|
2618
2626
|
revdeck devcontainer connect a devcontainer to the host daemon (--write)
|
|
2619
2627
|
revdeck doctor check the environment and access
|
|
2620
|
-
revdeck daemon <start|stop|status|logs|
|
|
2628
|
+
revdeck daemon <start|stop|restart|status|logs|install|uninstall>
|
|
2621
2629
|
revdeck list open reviews (local cache), --remote \u2014 from the platform
|
|
2622
2630
|
revdeck open <url|N> open a review and get the context
|
|
2623
2631
|
revdeck ui [N] link to the local UI
|
|
@@ -2924,7 +2932,7 @@ async function context(root, arg, values) {
|
|
|
2924
2932
|
review: review.id
|
|
2925
2933
|
});
|
|
2926
2934
|
if (values.json) return printJson(contextPayload(review, rules2));
|
|
2927
|
-
writers.out(renderContext(review, rules2, { language: rules2.language }));
|
|
2935
|
+
writers.out(renderContext(review, rules2, { language: rules2.language, ...rules2.maxBytes !== void 0 ? { maxBytes: rules2.maxBytes } : {} }));
|
|
2928
2936
|
});
|
|
2929
2937
|
}
|
|
2930
2938
|
async function threads(arg, values) {
|
|
@@ -3170,7 +3178,7 @@ async function rules(root, arg, values) {
|
|
|
3170
3178
|
language
|
|
3171
3179
|
});
|
|
3172
3180
|
if (values.json) return printJson(effective);
|
|
3173
|
-
return writers.out(renderRules(effective, { language }));
|
|
3181
|
+
return writers.out(renderRules(effective, { language, maxBytes: loaded.config.rules.maxTotalBytes }));
|
|
3174
3182
|
}
|
|
3175
3183
|
await withClient(async ({ client: client2 }) => {
|
|
3176
3184
|
const { review } = await resolveReview(client2, root, reviewArg(values, arg), values);
|