Skip to content

Unify import-time CSS injection and reorganize shared frontend modules - #273

Merged
steve02081504 merged 10 commits into
masterfrom
fix
Aug 1, 2026
Merged

Unify import-time CSS injection and reorganize shared frontend modules#273
steve02081504 merged 10 commits into
masterfrom
fix

Conversation

@steve02081504

@steve02081504 steve02081504 commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Standardize component CSS injection: load styles at module import via document.head.prepend instead of lazy ensure* helpers (emoji picker/preview, embed card, content reveal, image editor, POW captcha, toast, search, infinite scroll).
  • Move imageEditor under components/, flatten contentReveal into a single module with inlined styles, and relocate infiniteScroll to lib/; update chat/social import paths and static script tests.
  • Hoist image-editor i18n keys from social.composer.edit.* to util.imageEditor.* across locales; fix image-editor modal heading (h3h2).
  • Document the CSS injection convention in pages/AGENTS.md; exclude desktop.ini from CodeRabbit reviews.

Test plan

  • fount test --no-parallel (especially static_scripts and social shell tests)
  • Open social composer → attach image → image editor (crop/mosaic/brush) shows correct labels and applies edits
  • Verify emoji picker/preview, embed cards, sensitive-media/content-warning reveals, and toasts render with styles on first use
  • Confirm chat hub inbox and social feed infinite scroll still paginate correctly

统一前端组件的 CSS 注入方式:模块导入时使用 document.head.prepend,移除运行时 ensure* 样式加载逻辑。组件首次使用即可获得样式,但模块导入副作用增加,CSS 管理也更依赖加载顺序。

重组共享模块路径:图片编辑器移至 components/,无限滚动移至 lib/contentReveal 扁平化,并同步更新导入和静态脚本测试。图片编辑器翻译统一到 util.imageEditor.*,弹窗标题改为 h2

新增 CSS 注入规范文档,并调整 fount.sh 的本地化数据读取逻辑。大量 desktop.ini 属于无关的 Windows 元数据噪声,虽已排除审查,但仍污染仓库变更,削弱审查信噪比。

@cursor

cursor Bot commented Aug 1, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 47ca0fbf-d92f-4081-8f9f-905f9a8ef4b8

📥 Commits

Reviewing files that changed from the base of the PR and between f64572e and bb1982e.

📒 Files selected for processing (85)
  • .esh/desktop.ini
  • .github/ISSUE_TEMPLATE/desktop.ini
  • .github/actions/desktop.ini
  • .github/actions/fount-ci/desktop.ini
  • .github/desktop.ini
  • .github/pages/badges/desktop.ini
  • .github/pages/desktop.ini
  • .github/pages/login_info/desktop.ini
  • .github/pages/protocol/desktop.ini
  • .github/pages/readme/desktop.ini
  • .github/pages/scripts/desktop.ini
  • .github/pages/test/desktop.ini
  • .github/pages/test/frontend/desktop.ini
  • .github/pages/values_update/desktop.ini
  • .github/pages/wait/desktop.ini
  • .github/pages/wait/install/desktop.ini
  • .github/pages/wait/install/error/desktop.ini
  • .github/pages/wait/install/templates/desktop.ini
  • .github/workflows/default_data/desktop.ini
  • .github/workflows/desktop.ini
  • .github/workflows/scripts/desktop.ini
  • .vscode/desktop.ini
  • default/default_desktop.ini
  • default/desktop.ini
  • default/git_desktop.ini
  • default/node_modules_desktop.ini
  • docs/desktop.ini
  • imgs/desktop.ini
  • imgs/icon_anime/desktop.ini
  • imgs/icon_anime/fluid/desktop.ini
  • imgs/icon_anime/gesture/desktop.ini
  • imgs/icon_anime/test/desktop.ini
  • path/desktop.ini
  • path/fount.sh
  • src/decl/desktop.ini
  • src/desktop.ini
  • src/public/desktop.ini
  • src/public/locales/desktop.ini
  • src/public/pages/.well-known/desktop.ini
  • src/public/pages/404/desktop.ini
  • src/public/pages/desktop.ini
  • src/public/pages/directory-listing/desktop.ini
  • src/public/pages/login/desktop.ini
  • src/public/pages/preloadrunner/desktop.ini
  • src/public/pages/protocolhandler/desktop.ini
  • src/public/pages/scripts/api/desktop.ini
  • src/public/pages/scripts/api/p2p/desktop.ini
  • src/public/pages/scripts/components/desktop.ini
  • src/public/pages/scripts/desktop.ini
  • src/public/pages/scripts/features/desktop.ini
  • src/public/pages/scripts/features/emoji/desktop.ini
  • src/public/pages/scripts/features/markdown/desktop.ini
  • src/public/pages/scripts/features/templates/desktop.ini
  • src/public/pages/scripts/host/desktop.ini
  • src/public/pages/scripts/i18n/desktop.ini
  • src/public/pages/scripts/lib/desktop.ini
  • src/public/pages/scripts/test/desktop.ini
  • src/public/pages/scripts/theme/desktop.ini
  • src/public/parts/ImportHandlers/desktop.ini
  • src/public/parts/chars/desktop.ini
  • src/public/parts/desktop.ini
  • src/public/parts/personas/desktop.ini
  • src/public/parts/plugins/desktop.ini
  • src/public/parts/serviceGenerators/AI/desktop.ini
  • src/public/parts/serviceGenerators/desktop.ini
  • src/public/parts/serviceGenerators/search/desktop.ini
  • src/public/parts/serviceGenerators/translate/desktop.ini
  • src/public/parts/serviceSources/desktop.ini
  • src/public/parts/shells/desktop.ini
  • src/public/parts/worlds/desktop.ini
  • src/runner/desktop.ini
  • src/runner/dev_env_setup/desktop.ini
  • src/runner/polyglot/desktop.ini
  • src/scripts/desktop.ini
  • src/server/auth/desktop.ini
  • src/server/desktop.ini
  • src/server/ipc_server/desktop.ini
  • src/server/p2p_server/desktop.ini
  • src/server/test/desktop.ini
  • src/server/test/live/desktop.ini
  • src/server/test/pure/desktop.ini
  • src/server/web_server/desktop.ini
  • src/server/web_server/log_service/desktop.ini
  • src/server/web_server/notify/desktop.ini
  • src/workers/desktop.ini
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • steve02081504/fount-p2p (manual)

📝 Walkthrough

Walkthrough

本次变更重组图片编辑器本地化键和前端模块路径,统一多个组件的样式注入时机,调整本地化加载逻辑,并批量新增或更新 Windows desktop.ini 配置。

Changes

前端资源重组与目录元数据清理

Layer / File(s) Summary
目录元数据与评审过滤
.coderabbit.yaml, **/desktop.ini
新增 desktop.ini 配置,将固定系统路径改为 %SystemRoot%,并排除这些文件的审查路径。
图片编辑器本地化键迁移
src/decl/locale_data.ts, src/public/locales/*.json
将图片编辑器本地化键从 social 移至 util.imageEditor
模块级样式注入
src/public/pages/scripts/components/*.mjs, src/public/pages/scripts/features/*.mjs
将多个组件的样式加载改为模块加载时注入,并使用 document.head.prepend
图片编辑器资源与界面更新
src/public/pages/scripts/components/imageEditor.mjs, src/public/parts/shells/{chat,social}/...
更新图片编辑器路径、文案键、选项类型和界面样式。
共享模块路径迁移
src/public/parts/shells/..., src/server/test/..., src/public/pages/AGENTS.md
contentRevealinfiniteScroll 引用更新到新的模块路径。
本地化加载器调整
path/fount.sh
限制本地化加载输出范围,使用点分隔路径读取嵌套翻译,并在缺失时返回原始键。

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
审美与简洁 ⚠️ Warning emojiPicker.mjs:29 保留无必要重导出;emojiPicker.css 与 chat/widgets.css、social/styles.css 平行定义同一组 .emoji-grid* 样式。 删除该重导出;把共享 .emoji-grid* 规则集中到 emojiPicker.css,shell 文件仅保留真正的布局差异。
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确概括了统一模块加载时 CSS 注入和重组共享前端模块这两个主要变更目的。
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codacy-production

codacy-production Bot commented Aug 1, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 85 complexity · 0 duplication

Metric Results
Complexity 85
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🤖 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 @.github/ISSUE_TEMPLATE/desktop.ini:
- Line 2: Replace the hard-coded C:\WINDOWS prefix in IconResource for
.github/ISSUE_TEMPLATE/desktop.ini:2, .github/actions/desktop.ini:2,
.github/actions/fount-ci/desktop.ini:2,
src/public/pages/scripts/api/desktop.ini:2,
src/public/pages/scripts/api/p2p/desktop.ini:2,
src/public/pages/scripts/components/desktop.ini:2,
src/public/pages/scripts/components/imageEditor/desktop.ini:2,
src/public/pages/scripts/features/desktop.ini:2,
src/public/pages/scripts/features/emoji/desktop.ini:2,
src/public/pages/scripts/features/markdown/desktop.ini:2, and
src/public/pages/scripts/features/templates/desktop.ini:2 with the %SystemRoot%
environment-variable path while preserving each existing shell icon index.

In `@src/public/locales/vi-VN.json`:
- Line 5616: Update the Vietnamese locale’s image button translation under the
"image" key from "biên tập" to "Chỉnh sửa", preserving the existing locale
structure.

In `@src/public/pages/scripts/components/imageEditor/imageEditor.css`:
- Around line 1-25: 将 imageEditor/index.mjs 中 image editor 模板使用的
image-editor-box、image-editor-toolbar 和 image-editor-canvas-wrap 相关布局改为复用现有
DaisyUI/组件 utility class,并删除 imageEditor.css 中可替代的对应规则及其样式注入代码;仅保留现有组件类无法表达的
canvas 专属样式。

In `@src/public/pages/scripts/components/imageEditor/index.mjs`:
- Around line 19-26: Remove the one-use aliases titleI18n, cropI18n, mosaicI18n,
brushI18n, brushColorI18n, brushSizeI18n, cancelI18n, and applyI18n in the image
editor setup, and inline each corresponding escapeHtml(labels.* || fallback)
expression at its template usage. Do not introduce replacement temporary
bindings.

In `@src/public/pages/scripts/components/POWcaptcha.mjs`:
- Around line 39-56: Inline the one-off style element construction by removing
the temporary style bindings and passing
Object.assign(document.createElement('style'), { textContent: ... }) directly to
document.head.prepend(...) in
src/public/pages/scripts/components/POWcaptcha.mjs#L39-L56,
src/public/pages/scripts/components/search.mjs#L302-L310,
src/public/pages/scripts/features/contentReveal.mjs#L80-L139,
src/public/pages/scripts/features/toast.mjs#L173-L192, and
src/public/pages/scripts/lib/infiniteScroll.mjs#L4-L16; preserve each
stylesheet’s existing text content and insertion behavior.

In `@src/public/parts/shells/social/public/src/mediaRender.mjs`:
- Line 215: Remove the unused editI18n/editLabel override path from
renderMediaPreview, including the default fallback branch and corresponding
documentation option, while keeping the edit dataset value fixed to
util.imageEditor.image and the interface documentation consistent.
🪄 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: b3e88cbb-902e-45a3-b257-249d7d45109b

📥 Commits

Reviewing files that changed from the base of the PR and between ca26e21 and 871ec01.

📒 Files selected for processing (94)
  • .coderabbit.yaml
  • .github/ISSUE_TEMPLATE/desktop.ini
  • .github/actions/desktop.ini
  • .github/actions/fount-ci/desktop.ini
  • .github/pages/badges/desktop.ini
  • .github/pages/desktop.ini
  • .github/pages/login_info/desktop.ini
  • .github/pages/protocol/desktop.ini
  • .github/pages/readme/desktop.ini
  • .github/pages/scripts/desktop.ini
  • .github/pages/test/desktop.ini
  • .github/pages/test/frontend/desktop.ini
  • .github/pages/values_update/desktop.ini
  • .github/pages/wait/desktop.ini
  • .github/pages/wait/install/desktop.ini
  • .github/pages/wait/install/error/desktop.ini
  • .github/pages/wait/install/templates/desktop.ini
  • .github/workflows/default_data/desktop.ini
  • .github/workflows/desktop.ini
  • .github/workflows/scripts/desktop.ini
  • imgs/icon_anime/desktop.ini
  • imgs/icon_anime/fluid/desktop.ini
  • imgs/icon_anime/gesture/desktop.ini
  • imgs/icon_anime/test/desktop.ini
  • src/decl/locale_data.ts
  • src/public/locales/ar-SA.json
  • src/public/locales/de-DE.json
  • src/public/locales/emoji.json
  • src/public/locales/en-UK.json
  • src/public/locales/es-ES.json
  • src/public/locales/fr-FR.json
  • src/public/locales/hi-IN.json
  • src/public/locales/is-IS.json
  • src/public/locales/it-IT.json
  • src/public/locales/ja-JP.json
  • src/public/locales/ko-KR.json
  • src/public/locales/lzh.json
  • src/public/locales/nl-NL.json
  • src/public/locales/pt-PT.json
  • src/public/locales/ru-RU.json
  • src/public/locales/uk-UA.json
  • src/public/locales/vi-VN.json
  • src/public/locales/zh-CN.json
  • src/public/locales/zh-TW.json
  • src/public/pages/AGENTS.md
  • src/public/pages/log_viewer/repl/desktop.ini
  • src/public/pages/scripts/api/desktop.ini
  • src/public/pages/scripts/api/p2p/desktop.ini
  • src/public/pages/scripts/components/POWcaptcha.mjs
  • src/public/pages/scripts/components/desktop.ini
  • src/public/pages/scripts/components/emojiPackPreview.mjs
  • src/public/pages/scripts/components/emojiPicker.mjs
  • src/public/pages/scripts/components/imageEditor/desktop.ini
  • src/public/pages/scripts/components/imageEditor/imageEditor.css
  • src/public/pages/scripts/components/imageEditor/index.mjs
  • src/public/pages/scripts/components/search.mjs
  • src/public/pages/scripts/features/contentReveal.mjs
  • src/public/pages/scripts/features/contentReveal/contentReveal.css
  • src/public/pages/scripts/features/desktop.ini
  • src/public/pages/scripts/features/embedCard.mjs
  • src/public/pages/scripts/features/emoji/desktop.ini
  • src/public/pages/scripts/features/markdown/desktop.ini
  • src/public/pages/scripts/features/templates/desktop.ini
  • src/public/pages/scripts/features/toast.mjs
  • src/public/pages/scripts/host/desktop.ini
  • src/public/pages/scripts/i18n/desktop.ini
  • src/public/pages/scripts/lib/desktop.ini
  • src/public/pages/scripts/lib/infiniteScroll.mjs
  • src/public/pages/scripts/test/desktop.ini
  • src/public/pages/scripts/theme/desktop.ini
  • src/public/parts/ImportHandlers/fount/desktop.ini
  • src/public/parts/shells/chat/public/hub/inboxView.mjs
  • src/public/parts/shells/chat/public/hub/messages/render/index.mjs
  • src/public/parts/shells/chat/public/src/composerAttachments.mjs
  • src/public/parts/shells/social/public/src/composerState.mjs
  • src/public/parts/shells/social/public/src/init.mjs
  • src/public/parts/shells/social/public/src/lib/feedThreads.mjs
  • src/public/parts/shells/social/public/src/mediaRender.mjs
  • src/public/parts/shells/social/public/src/postCard.mjs
  • src/public/parts/shells/social/public/src/views/feed.mjs
  • src/public/parts/shells/social/public/src/views/notifications.mjs
  • src/public/parts/shells/social/public/src/views/profile.mjs
  • src/public/parts/shells/social/public/src/views/search.mjs
  • src/public/parts/shells/social/public/src/views/topic.mjs
  • src/public/parts/shells/social/public/ui-details.md
  • src/public/parts/shells/social/test/manifest.json
  • src/runner/dev_env_setup/desktop.ini
  • src/server/auth/desktop.ini
  • src/server/p2p_server/desktop.ini
  • src/server/test/live/desktop.ini
  • src/server/test/live/static_scripts.test.mjs
  • src/server/test/pure/desktop.ini
  • src/server/web_server/log_service/desktop.ini
  • src/server/web_server/notify/desktop.ini
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • steve02081504/fount-p2p (manual)
💤 Files with no reviewable changes (1)
  • src/public/pages/scripts/features/contentReveal/contentReveal.css

Comment thread .github/ISSUE_TEMPLATE/desktop.ini Outdated
Comment thread src/public/locales/vi-VN.json Outdated
Comment on lines +19 to +26
const titleI18n = escapeHtml(labels.titleI18n || 'util.imageEditor.image')
const cropI18n = escapeHtml(labels.cropI18n || 'util.imageEditor.crop')
const mosaicI18n = escapeHtml(labels.mosaicI18n || 'util.imageEditor.mosaic')
const brushI18n = escapeHtml(labels.brushI18n || 'util.imageEditor.brush')
const brushColorI18n = escapeHtml(labels.brushColorI18n || 'util.imageEditor.brushColor')
const brushSizeI18n = escapeHtml(labels.brushSizeI18n || 'util.imageEditor.brushSize')
const cancelI18n = escapeHtml(labels.cancelI18n || 'util.common.cancel')
const applyI18n = escapeHtml(labels.applyI18n || 'util.imageEditor.apply')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

合并一次性文案绑定。

titleI18napplyI18n 每个只在模板中使用一次。不要为每个键创建别名。直接内联 escapeHtml(...),或定义一个复用的 i18nKey(value, fallback) helper。

依据编码规范和路径指令:禁止只用一次的临时绑定,优先直接内联。

🤖 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 `@src/public/pages/scripts/components/imageEditor/index.mjs` around lines 19 -
26, Remove the one-use aliases titleI18n, cropI18n, mosaicI18n, brushI18n,
brushColorI18n, brushSizeI18n, cancelI18n, and applyI18n in the image editor
setup, and inline each corresponding escapeHtml(labels.* || fallback) expression
at its template usage. Do not introduce replacement temporary bindings.

Sources: Coding guidelines, Path instructions

Comment thread src/public/pages/scripts/components/POWcaptcha.mjs Outdated
Comment thread src/public/parts/shells/social/public/src/mediaRender.mjs Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 6

🤖 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 @.github/ISSUE_TEMPLATE/desktop.ini:
- Line 2: Replace the hard-coded C:\WINDOWS prefix in IconResource for
.github/ISSUE_TEMPLATE/desktop.ini:2, .github/actions/desktop.ini:2,
.github/actions/fount-ci/desktop.ini:2,
src/public/pages/scripts/api/desktop.ini:2,
src/public/pages/scripts/api/p2p/desktop.ini:2,
src/public/pages/scripts/components/desktop.ini:2,
src/public/pages/scripts/components/imageEditor/desktop.ini:2,
src/public/pages/scripts/features/desktop.ini:2,
src/public/pages/scripts/features/emoji/desktop.ini:2,
src/public/pages/scripts/features/markdown/desktop.ini:2, and
src/public/pages/scripts/features/templates/desktop.ini:2 with the %SystemRoot%
environment-variable path while preserving each existing shell icon index.

In `@src/public/locales/vi-VN.json`:
- Line 5616: Update the Vietnamese locale’s image button translation under the
"image" key from "biên tập" to "Chỉnh sửa", preserving the existing locale
structure.

In `@src/public/pages/scripts/components/imageEditor/imageEditor.css`:
- Around line 1-25: 将 imageEditor/index.mjs 中 image editor 模板使用的
image-editor-box、image-editor-toolbar 和 image-editor-canvas-wrap 相关布局改为复用现有
DaisyUI/组件 utility class,并删除 imageEditor.css 中可替代的对应规则及其样式注入代码;仅保留现有组件类无法表达的
canvas 专属样式。

In `@src/public/pages/scripts/components/imageEditor/index.mjs`:
- Around line 19-26: Remove the one-use aliases titleI18n, cropI18n, mosaicI18n,
brushI18n, brushColorI18n, brushSizeI18n, cancelI18n, and applyI18n in the image
editor setup, and inline each corresponding escapeHtml(labels.* || fallback)
expression at its template usage. Do not introduce replacement temporary
bindings.

In `@src/public/pages/scripts/components/POWcaptcha.mjs`:
- Around line 39-56: Inline the one-off style element construction by removing
the temporary style bindings and passing
Object.assign(document.createElement('style'), { textContent: ... }) directly to
document.head.prepend(...) in
src/public/pages/scripts/components/POWcaptcha.mjs#L39-L56,
src/public/pages/scripts/components/search.mjs#L302-L310,
src/public/pages/scripts/features/contentReveal.mjs#L80-L139,
src/public/pages/scripts/features/toast.mjs#L173-L192, and
src/public/pages/scripts/lib/infiniteScroll.mjs#L4-L16; preserve each
stylesheet’s existing text content and insertion behavior.

In `@src/public/parts/shells/social/public/src/mediaRender.mjs`:
- Line 215: Remove the unused editI18n/editLabel override path from
renderMediaPreview, including the default fallback branch and corresponding
documentation option, while keeping the edit dataset value fixed to
util.imageEditor.image and the interface documentation consistent.
🪄 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: b3e88cbb-902e-45a3-b257-249d7d45109b

📥 Commits

Reviewing files that changed from the base of the PR and between ca26e21 and 871ec01.

📒 Files selected for processing (94)
  • .coderabbit.yaml
  • .github/ISSUE_TEMPLATE/desktop.ini
  • .github/actions/desktop.ini
  • .github/actions/fount-ci/desktop.ini
  • .github/pages/badges/desktop.ini
  • .github/pages/desktop.ini
  • .github/pages/login_info/desktop.ini
  • .github/pages/protocol/desktop.ini
  • .github/pages/readme/desktop.ini
  • .github/pages/scripts/desktop.ini
  • .github/pages/test/desktop.ini
  • .github/pages/test/frontend/desktop.ini
  • .github/pages/values_update/desktop.ini
  • .github/pages/wait/desktop.ini
  • .github/pages/wait/install/desktop.ini
  • .github/pages/wait/install/error/desktop.ini
  • .github/pages/wait/install/templates/desktop.ini
  • .github/workflows/default_data/desktop.ini
  • .github/workflows/desktop.ini
  • .github/workflows/scripts/desktop.ini
  • imgs/icon_anime/desktop.ini
  • imgs/icon_anime/fluid/desktop.ini
  • imgs/icon_anime/gesture/desktop.ini
  • imgs/icon_anime/test/desktop.ini
  • src/decl/locale_data.ts
  • src/public/locales/ar-SA.json
  • src/public/locales/de-DE.json
  • src/public/locales/emoji.json
  • src/public/locales/en-UK.json
  • src/public/locales/es-ES.json
  • src/public/locales/fr-FR.json
  • src/public/locales/hi-IN.json
  • src/public/locales/is-IS.json
  • src/public/locales/it-IT.json
  • src/public/locales/ja-JP.json
  • src/public/locales/ko-KR.json
  • src/public/locales/lzh.json
  • src/public/locales/nl-NL.json
  • src/public/locales/pt-PT.json
  • src/public/locales/ru-RU.json
  • src/public/locales/uk-UA.json
  • src/public/locales/vi-VN.json
  • src/public/locales/zh-CN.json
  • src/public/locales/zh-TW.json
  • src/public/pages/AGENTS.md
  • src/public/pages/log_viewer/repl/desktop.ini
  • src/public/pages/scripts/api/desktop.ini
  • src/public/pages/scripts/api/p2p/desktop.ini
  • src/public/pages/scripts/components/POWcaptcha.mjs
  • src/public/pages/scripts/components/desktop.ini
  • src/public/pages/scripts/components/emojiPackPreview.mjs
  • src/public/pages/scripts/components/emojiPicker.mjs
  • src/public/pages/scripts/components/imageEditor/desktop.ini
  • src/public/pages/scripts/components/imageEditor/imageEditor.css
  • src/public/pages/scripts/components/imageEditor/index.mjs
  • src/public/pages/scripts/components/search.mjs
  • src/public/pages/scripts/features/contentReveal.mjs
  • src/public/pages/scripts/features/contentReveal/contentReveal.css
  • src/public/pages/scripts/features/desktop.ini
  • src/public/pages/scripts/features/embedCard.mjs
  • src/public/pages/scripts/features/emoji/desktop.ini
  • src/public/pages/scripts/features/markdown/desktop.ini
  • src/public/pages/scripts/features/templates/desktop.ini
  • src/public/pages/scripts/features/toast.mjs
  • src/public/pages/scripts/host/desktop.ini
  • src/public/pages/scripts/i18n/desktop.ini
  • src/public/pages/scripts/lib/desktop.ini
  • src/public/pages/scripts/lib/infiniteScroll.mjs
  • src/public/pages/scripts/test/desktop.ini
  • src/public/pages/scripts/theme/desktop.ini
  • src/public/parts/ImportHandlers/fount/desktop.ini
  • src/public/parts/shells/chat/public/hub/inboxView.mjs
  • src/public/parts/shells/chat/public/hub/messages/render/index.mjs
  • src/public/parts/shells/chat/public/src/composerAttachments.mjs
  • src/public/parts/shells/social/public/src/composerState.mjs
  • src/public/parts/shells/social/public/src/init.mjs
  • src/public/parts/shells/social/public/src/lib/feedThreads.mjs
  • src/public/parts/shells/social/public/src/mediaRender.mjs
  • src/public/parts/shells/social/public/src/postCard.mjs
  • src/public/parts/shells/social/public/src/views/feed.mjs
  • src/public/parts/shells/social/public/src/views/notifications.mjs
  • src/public/parts/shells/social/public/src/views/profile.mjs
  • src/public/parts/shells/social/public/src/views/search.mjs
  • src/public/parts/shells/social/public/src/views/topic.mjs
  • src/public/parts/shells/social/public/ui-details.md
  • src/public/parts/shells/social/test/manifest.json
  • src/runner/dev_env_setup/desktop.ini
  • src/server/auth/desktop.ini
  • src/server/p2p_server/desktop.ini
  • src/server/test/live/desktop.ini
  • src/server/test/live/static_scripts.test.mjs
  • src/server/test/pure/desktop.ini
  • src/server/web_server/log_service/desktop.ini
  • src/server/web_server/notify/desktop.ini
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • steve02081504/fount-p2p (manual)
💤 Files with no reviewable changes (1)
  • src/public/pages/scripts/features/contentReveal/contentReveal.css
🛑 Comments failed to post (1)
src/public/pages/scripts/components/imageEditor/imageEditor.css (1)

1-25: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

删除这组平行布局 CSS。

这些规则只表达通用 utility 能力。把 class 直接写入 src/public/pages/scripts/components/imageEditor/index.mjs 的模板(Line [28] 至 Line [38]),然后删除本文件和对应的样式注入代码。只保留无法由现有组件类表达的规则。

依据 CSS 规范和路径指令:优先复用 DaisyUI/现有组件类,能删则删。

🤖 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 `@src/public/pages/scripts/components/imageEditor/imageEditor.css` around lines
1 - 25, 将 imageEditor/index.mjs 中 image editor 模板使用的
image-editor-box、image-editor-toolbar 和 image-editor-canvas-wrap 相关布局改为复用现有
DaisyUI/组件 utility class,并删除 imageEditor.css 中可替代的对应规则及其样式注入代码;仅保留现有组件类无法表达的
canvas 专属样式。

Sources: Coding guidelines, Path instructions

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 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 @.esh/desktop.ini:
- Line 2: Update IconResource in .esh/desktop.ini:2,
.github/ISSUE_TEMPLATE/desktop.ini:2, .github/actions/desktop.ini:2,
.github/actions/fount-ci/desktop.ini:2,
src/public/pages/preloadrunner/desktop.ini:2,
src/public/pages/protocolhandler/desktop.ini:2,
src/public/pages/scripts/api/desktop.ini:2,
src/public/pages/scripts/api/p2p/desktop.ini:2,
src/public/pages/scripts/components/desktop.ini:2,
src/public/pages/scripts/features/desktop.ini:2, and
src/public/pages/scripts/features/emoji/desktop.ini:2 to use
%SystemRoot%\System32\SHELL32.dll while preserving each file’s existing resource
index.

In @.github/desktop.ini:
- Line 2: Update the IconResource path in all ten desktop.ini files:
.github/desktop.ini (line 2), .github/pages/badges/desktop.ini (line 2),
.github/pages/desktop.ini (line 2), .github/pages/login_info/desktop.ini (line
2), .github/pages/protocol/desktop.ini (line 2),
src/public/pages/scripts/features/markdown/desktop.ini (line 2),
src/public/pages/scripts/features/templates/desktop.ini (line 2),
src/public/pages/scripts/host/desktop.ini (line 2),
src/public/pages/scripts/i18n/desktop.ini (line 2), and
src/public/pages/scripts/lib/desktop.ini (line 2); insert System32 between
%SystemRoot% and SHELL32.dll while preserving each file’s existing icon index.

In `@src/desktop.ini`:
- Line 2: 统一更新各 desktop.ini 的 IconResource 路径,将系统文件位置从 %SystemRoot% 根目录改为
%SystemRoot%\System32,并保留现有 DLL/EXE 文件名及图标索引:src/desktop.ini#L2-L2 使用
SHELL32.dll,72;src/log_viewer/desktop.ini#L2-L2 使用
cmd.exe,0;src/public/desktop.ini#L2-L2 使用
SHELL32.dll,148;src/public/locales/desktop.ini#L2-L2 使用
SHELL32.dll,14;src/public/pages/.well-known/desktop.ini#L2-L2 使用
SHELL32.dll,130;src/public/pages/404/desktop.ini#L2-L2 使用
SHELL32.dll,50;src/public/pages/desktop.ini#L2-L2 使用
SHELL32.dll,189;src/public/pages/directory-listing/desktop.ini#L2-L2 使用
SHELL32.dll,270;src/public/pages/log_viewer/desktop.ini#L2-L2 和
src/public/pages/log_viewer/repl/desktop.ini#L2-L2 使用
cmd.exe,0;src/public/pages/login/desktop.ini#L2-L2 使用 SHELL32.dll,166。

In `@src/public/parts/plugins/desktop.ini`:
- Line 2: 统一更新所有 desktop.ini 的 IconResource 路径,补上 System32
并保留现有图标索引:src/public/parts/plugins/desktop.ini#L2-L2 使用索引
26;.github/pages/wait/desktop.ini#L2-L2 使用
297;.github/pages/wait/install/desktop.ini#L2-L2 使用
122;.github/pages/wait/install/error/desktop.ini#L2-L2 使用
235;.github/pages/wait/install/templates/desktop.ini#L2-L2 使用
189;.github/workflows/default_data/desktop.ini#L2-L2 使用
132;src/public/parts/serviceGenerators/AI/desktop.ini#L2-L2 使用
225;src/public/parts/serviceGenerators/desktop.ini#L2-L2 使用
14;src/public/parts/serviceGenerators/search/desktop.ini#L2-L2 使用
22;src/public/parts/serviceGenerators/translate/desktop.ini#L2-L2 使用
73;src/public/parts/serviceSources/desktop.ini#L2-L2 使用 15。
🪄 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: 4aeb0661-13fe-43e6-a3da-65f69ab45e58

📥 Commits

Reviewing files that changed from the base of the PR and between 871ec01 and f64572e.

📒 Files selected for processing (98)
  • .esh/desktop.ini
  • .github/ISSUE_TEMPLATE/desktop.ini
  • .github/actions/desktop.ini
  • .github/actions/fount-ci/desktop.ini
  • .github/desktop.ini
  • .github/pages/badges/desktop.ini
  • .github/pages/desktop.ini
  • .github/pages/login_info/desktop.ini
  • .github/pages/protocol/desktop.ini
  • .github/pages/readme/desktop.ini
  • .github/pages/scripts/desktop.ini
  • .github/pages/test/desktop.ini
  • .github/pages/test/frontend/desktop.ini
  • .github/pages/values_update/desktop.ini
  • .github/pages/wait/desktop.ini
  • .github/pages/wait/install/desktop.ini
  • .github/pages/wait/install/error/desktop.ini
  • .github/pages/wait/install/templates/desktop.ini
  • .github/workflows/default_data/desktop.ini
  • .github/workflows/desktop.ini
  • .github/workflows/scripts/desktop.ini
  • .vscode/desktop.ini
  • default/default_desktop.ini
  • default/desktop.ini
  • default/git_desktop.ini
  • default/node_modules_desktop.ini
  • docs/desktop.ini
  • imgs/desktop.ini
  • imgs/icon_anime/desktop.ini
  • imgs/icon_anime/fluid/desktop.ini
  • imgs/icon_anime/gesture/desktop.ini
  • imgs/icon_anime/test/desktop.ini
  • path/desktop.ini
  • src/decl/desktop.ini
  • src/desktop.ini
  • src/log_viewer/desktop.ini
  • src/public/desktop.ini
  • src/public/locales/desktop.ini
  • src/public/locales/vi-VN.json
  • src/public/pages/.well-known/desktop.ini
  • src/public/pages/404/desktop.ini
  • src/public/pages/AGENTS.md
  • src/public/pages/desktop.ini
  • src/public/pages/directory-listing/desktop.ini
  • src/public/pages/log_viewer/desktop.ini
  • src/public/pages/log_viewer/repl/desktop.ini
  • src/public/pages/login/desktop.ini
  • src/public/pages/preloadrunner/desktop.ini
  • src/public/pages/protocolhandler/desktop.ini
  • src/public/pages/scripts/api/desktop.ini
  • src/public/pages/scripts/api/p2p/desktop.ini
  • src/public/pages/scripts/components/POWcaptcha.mjs
  • src/public/pages/scripts/components/desktop.ini
  • src/public/pages/scripts/components/imageEditor.mjs
  • src/public/pages/scripts/components/search.mjs
  • src/public/pages/scripts/desktop.ini
  • src/public/pages/scripts/features/contentReveal.mjs
  • src/public/pages/scripts/features/desktop.ini
  • src/public/pages/scripts/features/emoji/desktop.ini
  • src/public/pages/scripts/features/markdown/desktop.ini
  • src/public/pages/scripts/features/templates/desktop.ini
  • src/public/pages/scripts/features/toast.mjs
  • src/public/pages/scripts/host/desktop.ini
  • src/public/pages/scripts/i18n/desktop.ini
  • src/public/pages/scripts/lib/desktop.ini
  • src/public/pages/scripts/lib/infiniteScroll.mjs
  • src/public/pages/scripts/test/desktop.ini
  • src/public/pages/scripts/theme/desktop.ini
  • src/public/parts/ImportHandlers/desktop.ini
  • src/public/parts/chars/desktop.ini
  • src/public/parts/desktop.ini
  • src/public/parts/personas/desktop.ini
  • src/public/parts/plugins/desktop.ini
  • src/public/parts/serviceGenerators/AI/desktop.ini
  • src/public/parts/serviceGenerators/desktop.ini
  • src/public/parts/serviceGenerators/search/desktop.ini
  • src/public/parts/serviceGenerators/translate/desktop.ini
  • src/public/parts/serviceSources/desktop.ini
  • src/public/parts/shells/chat/public/src/composerAttachments.mjs
  • src/public/parts/shells/desktop.ini
  • src/public/parts/shells/social/public/src/composerState.mjs
  • src/public/parts/shells/social/public/src/mediaRender.mjs
  • src/public/parts/worlds/desktop.ini
  • src/runner/desktop.ini
  • src/runner/dev_env_setup/desktop.ini
  • src/runner/polyglot/desktop.ini
  • src/scripts/desktop.ini
  • src/server/auth/desktop.ini
  • src/server/desktop.ini
  • src/server/ipc_server/desktop.ini
  • src/server/p2p_server/desktop.ini
  • src/server/test/desktop.ini
  • src/server/test/live/desktop.ini
  • src/server/test/pure/desktop.ini
  • src/server/web_server/desktop.ini
  • src/server/web_server/log_service/desktop.ini
  • src/server/web_server/notify/desktop.ini
  • src/workers/desktop.ini
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • steve02081504/fount-p2p (manual)

Comment thread .esh/desktop.ini Outdated
Comment thread .github/desktop.ini Outdated
Comment thread src/desktop.ini Outdated
@@ -1,5 +1,5 @@
[.ShellClassInfo]
IconResource=C:\WINDOWS\System32\SHELL32.dll,72
IconResource=%SystemRoot%\SHELL32.dll,72

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

统一修正 IconResource 路径。

当前路径把系统文件放在 %SystemRoot% 根目录。标准位置是 %SystemRoot%\System32。否则 Windows 可能无法加载这些文件夹图标。

  • src/desktop.ini#L2-L2: 使用 %SystemRoot%\System32\SHELL32.dll,72
  • src/log_viewer/desktop.ini#L2-L2: 使用 %SystemRoot%\System32\cmd.exe,0
  • src/public/desktop.ini#L2-L2: 使用 %SystemRoot%\System32\SHELL32.dll,148
  • src/public/locales/desktop.ini#L2-L2: 使用 %SystemRoot%\System32\SHELL32.dll,14
  • src/public/pages/.well-known/desktop.ini#L2-L2: 使用 %SystemRoot%\System32\SHELL32.dll,130
  • src/public/pages/404/desktop.ini#L2-L2: 使用 %SystemRoot%\System32\SHELL32.dll,50
  • src/public/pages/desktop.ini#L2-L2: 使用 %SystemRoot%\System32\SHELL32.dll,189
  • src/public/pages/directory-listing/desktop.ini#L2-L2: 使用 %SystemRoot%\System32\SHELL32.dll,270
  • src/public/pages/log_viewer/desktop.ini#L2-L2: 使用 %SystemRoot%\System32\cmd.exe,0
  • src/public/pages/log_viewer/repl/desktop.ini#L2-L2: 使用 %SystemRoot%\System32\cmd.exe,0
  • src/public/pages/login/desktop.ini#L2-L2: 使用 %SystemRoot%\System32\SHELL32.dll,166
建议修复
-IconResource=%SystemRoot%\SHELL32.dll,<index>
+IconResource=%SystemRoot%\System32\SHELL32.dll,<index>

-IconResource=%SystemRoot%\cmd.exe,0
+IconResource=%SystemRoot%\System32\cmd.exe,0
📍 Affects 11 files
  • src/desktop.ini#L2-L2 (this comment)
  • src/log_viewer/desktop.ini#L2-L2
  • src/public/desktop.ini#L2-L2
  • src/public/locales/desktop.ini#L2-L2
  • src/public/pages/.well-known/desktop.ini#L2-L2
  • src/public/pages/404/desktop.ini#L2-L2
  • src/public/pages/desktop.ini#L2-L2
  • src/public/pages/directory-listing/desktop.ini#L2-L2
  • src/public/pages/log_viewer/desktop.ini#L2-L2
  • src/public/pages/log_viewer/repl/desktop.ini#L2-L2
  • src/public/pages/login/desktop.ini#L2-L2
🤖 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 `@src/desktop.ini` at line 2, 统一更新各 desktop.ini 的 IconResource 路径,将系统文件位置从
%SystemRoot% 根目录改为 %SystemRoot%\System32,并保留现有 DLL/EXE
文件名及图标索引:src/desktop.ini#L2-L2 使用
SHELL32.dll,72;src/log_viewer/desktop.ini#L2-L2 使用
cmd.exe,0;src/public/desktop.ini#L2-L2 使用
SHELL32.dll,148;src/public/locales/desktop.ini#L2-L2 使用
SHELL32.dll,14;src/public/pages/.well-known/desktop.ini#L2-L2 使用
SHELL32.dll,130;src/public/pages/404/desktop.ini#L2-L2 使用
SHELL32.dll,50;src/public/pages/desktop.ini#L2-L2 使用
SHELL32.dll,189;src/public/pages/directory-listing/desktop.ini#L2-L2 使用
SHELL32.dll,270;src/public/pages/log_viewer/desktop.ini#L2-L2 和
src/public/pages/log_viewer/repl/desktop.ini#L2-L2 使用
cmd.exe,0;src/public/pages/login/desktop.ini#L2-L2 使用 SHELL32.dll,166。

Comment thread src/public/parts/plugins/desktop.ini Outdated
@steve02081504
steve02081504 merged commit eaf1e5f into master Aug 1, 2026
38 of 39 checks passed
@steve02081504
steve02081504 deleted the fix branch August 1, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants