C8c: строгий browser gate Point | Unknown - #364
Conversation
|
Draft review-status comment superseded by current implementation and package diagnostics. |
|
Controller locations использованы; диагностический список больше не актуален. |
c442da5 to
4af896d
Compare
lemone112
left a comment
There was a problem hiding this comment.
Owner self-review in progress. Required before merge: exact full CI, npm tarball includes the package-private bridge, no public export of observation internals, unsupported host state remains Unknown, and no legacy white fallback/controller lifecycle shadow remains.
lemone112
left a comment
There was a problem hiding this comment.
@coderabbitai review
C8c exact package RED
typechecktest |
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughДобавлен строгий адаптер наблюдения точечного фона с результатами ChangesStrict point observation
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Comment |
C8c exact package RED
typechecktest |
a72a1b6 to
a62e9a1
Compare
8fce9f7 to
62f7b0c
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/colors/watch-theme.js`:
- Around line 77-86: Приведите описание параметра `onError` в публичном JSDoc к
единому языку, заменив смешанные русские и английские фразы на связное
английское описание. Сохраните смысл: обработчик получает ошибки обновлений
наблюдателя и запуска после захвата observer, а явные вызовы `refresh` и
`setTheme` по-прежнему выбрасывают ошибки.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: cfd4845d-2442-48dc-87ec-e07572024bcd
📒 Files selected for processing (13)
packages/colors/adapt-theme.d.tspackages/colors/adapt-theme.jspackages/colors/background-observation.jspackages/colors/effective-bg.jspackages/colors/package.jsonpackages/colors/test/adapt-theme.test.mjspackages/colors/test/c8c-hostile-ancestor.test.mjspackages/colors/test/c8c-point-unknown.test.mjspackages/colors/test/oklch-parse.test.mjspackages/colors/test/public-api-cleanup.test.mjspackages/colors/test/runtime.test.mjspackages/colors/watch-theme.d.tspackages/colors/watch-theme.js
| * @param {string} [options.canvas] Caller-declared opaque page canvas. | ||
| * @param {boolean} [options.observe=true] Auto-refresh on `style`/`class` | ||
| * attribute changes in the observed subtree. | ||
| * @param {(error: unknown) => void} [options.onError] Receives failures from | ||
| * observer-обновлений и startup после захвата observer. Явные | ||
| * `refresh`/`setTheme` по-прежнему бросают. | ||
| * @param {*} [options.root] Mutation-observer root (default: the document element). | ||
| * @param {*} [options.win=globalThis] Window-like host (for MutationObserver). | ||
| * @param {(el:*)=>*} [options.getStyle] Injection seam for `effectiveBackground`. | ||
| * @param {(el:*)=>*} [options.parentOf] Injection seam for `effectiveBackground`. | ||
| * @param {(el:*)=>*} [options.getStyle] Injection seam for strict point observation. | ||
| * @param {(el:*)=>*} [options.parentOf] Injection seam for strict point observation. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Смешение языков в публичном JSDoc для onError.
Строки 80-82 переключаются с английского на русский посреди одного предложения ("Receives failures from observer-обновлений и startup после захвата observer. Явные refresh/setTheme по-прежнему бросают."). Для публичного API-описания это снижает читаемость и выглядит как артефакт неполного перевода.
✏️ Предложенная правка
- * `@param` {(error: unknown) => void} [options.onError] Receives failures from
- * observer-обновлений и startup после захвата observer. Явные
- * `refresh`/`setTheme` по-прежнему бросают.
+ * `@param` {(error: unknown) => void} [options.onError] Receives failures from
+ * observer updates and startup after observer acquisition. Explicit
+ * `refresh`/`setTheme` calls still throw synchronously.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| * @param {string} [options.canvas] Caller-declared opaque page canvas. | |
| * @param {boolean} [options.observe=true] Auto-refresh on `style`/`class` | |
| * attribute changes in the observed subtree. | |
| * @param {(error: unknown) => void} [options.onError] Receives failures from | |
| * observer-обновлений и startup после захвата observer. Явные | |
| * `refresh`/`setTheme` по-прежнему бросают. | |
| * @param {*} [options.root] Mutation-observer root (default: the document element). | |
| * @param {*} [options.win=globalThis] Window-like host (for MutationObserver). | |
| * @param {(el:*)=>*} [options.getStyle] Injection seam for `effectiveBackground`. | |
| * @param {(el:*)=>*} [options.parentOf] Injection seam for `effectiveBackground`. | |
| * @param {(el:*)=>*} [options.getStyle] Injection seam for strict point observation. | |
| * @param {(el:*)=>*} [options.parentOf] Injection seam for strict point observation. | |
| * `@param` {string} [options.canvas] Caller-declared opaque page canvas. | |
| * `@param` {boolean} [options.observe=true] Auto-refresh on `style`/`class` | |
| * attribute changes in the observed subtree. | |
| * `@param` {(error: unknown) => void} [options.onError] Receives failures from | |
| * observer updates and startup after observer acquisition. Explicit | |
| * `refresh`/`setTheme` calls still throw synchronously. | |
| * `@param` {*} [options.root] Mutation-observer root (default: the document element). | |
| * `@param` {*} [options.win=globalThis] Window-like host (for MutationObserver). | |
| * `@param` {(el:*)=>*} [options.getStyle] Injection seam for strict point observation. | |
| * `@param` {(el:*)=>*} [options.parentOf] Injection seam for strict point observation. |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/colors/watch-theme.js` around lines 77 - 86, Приведите описание
параметра `onError` в публичном JSDoc к единому языку, заменив смешанные русские
и английские фразы на связное английское описание. Сохраните смысл: обработчик
получает ошибки обновлений наблюдателя и запуска после захвата observer, а явные
вызовы `refresh` и `setTheme` по-прежнему выбрасывают ошибки.
Срез
Package-private C8c browser observation bridge поверх F2.
Реализовано
observePointBackgroundдляwatchThemeиadaptTheme;canvas;__over, а не JS accumulator;Unknown;watchTheme/adaptThemeнаUnknownне вызывают resolver/recheck и не пишут DOM;Unknown → Pointbootstrap и pending theme intent сохраняются;{kind: point|unknown}channel;effective-bg.jsоставляет только parser/interpolation helpers;Доказательства финального merge-head
62f7b0c2-D warnings, MSRV 1.85, rustdoc и packaged doctests — PASS;npm testи TypeScript — PASS;Границы
9d91b841.62f7b0c2; 13 package/controller/contract-test files.Summary by CodeRabbit
Новые возможности
canvasдля прозрачного корня.onError.Исправления
Документация
PointиUnknown.