Skip to content

refactor: clean repetitive boilerplate code at project entrypoint - #905

Merged
Nagi-ovo merged 17 commits into
Nagi-ovo:mainfrom
andy-ish:refactor/entrypoint
Aug 7, 2026
Merged

refactor: clean repetitive boilerplate code at project entrypoint#905
Nagi-ovo merged 17 commits into
Nagi-ovo:mainfrom
andy-ish:refactor/entrypoint

Conversation

@andy-ish

@andy-ish andy-ish commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Description / 描述

该 PR 通过引入一个清理函数管理器(cleanupManager)来统一管理 src/pages/content/index.tsx 中大量重复的清理代码。

Related Issue / 相关 Issue

Closes #897

  • If the issue is labeled community-only, I was assigned after maintainer approval before starting. / 如果 Issue 带有 community-only 标签,我已在开始前获得维护者确认并被分配。

Visual Proof / 可视化证据

未涉及 UI 和宏观行为修改。

Browser Testing / 浏览器测试

Tested commit / 测试提交: b17c614

Browser / version Scenario and result / 场景与结果 Evidence / 证据
Chromium 153.0.7984.0 所有功能加载正常,且关闭标签页时无报错

Code Explanation / 代码说明

  1. src/core/utils/cleanupManager.ts

    • registerCleanupFunction 方法注册一个清理函数,并接受一个 pos: number 表示清理函数的执行时机。pos 越小,函数执行越靠前。该方法会对传入的函数进行基于引用的基础去重,但是不会对 pos 去重。
    • registerCleanupFunctionAndReturnItregisterCleanupFunction 的功能一样,只不过会额外把清理函数原样返回。
    • withdrawCleanupFunctionsByPositionNumber 接受一个 pos: number,并删除已注册函数中所有 pos 相同的函数。
    • executeCleanups 会按照 pos 顺序执行所有的清理函数。若有清理函数报错则会跳过并继续执行后面的,并在所有函数执行完毕后把最后一个报错重新抛出给上游。
  2. src/core/types/cleanupPositions.ts

    • 用枚举定义的清理函数执行顺序。

Checklist / 检查清单

  • If I used an agent, I discussed the requirement, affected scope, and verification plan clearly. / 如果使用了 Agent,我已讨论清楚需求、影响范围和验证方式。
  • I have manually verified that the feature works as intended. / 我已手动验证功能按预期工作。
  • For UI/behavior changes, I have tried the real workflow for about 15 minutes when possible. / 对于 UI/行为改动,条件允许时我已用真实流程体验约 15 分钟。
  • For UI/behavior changes, I have included visual proof after verification. / 对于 UI/行为改动,我已在验证后提供可视化证据。
  • I have confirmed that this PR does not break existing functionality. / 我已确认此 PR 不会破坏原有功能。
  • This PR focuses on one issue or one coherent change. / 此 PR 只聚焦一个问题或一个清晰完整的改动。
  • I ran bun run format, bun run lint, then the standard local bun run verify:pr, or listed every omitted command and reason above. / 我已依次运行格式化、自动修复及标准本地 bun run verify:pr 验证,或在上方逐项说明未运行命令及原因。
  • I added/updated regression tests for behavior changes, or explained why no test is useful. / 行为改动已添加或更新回归测试;若无需测试,我已说明理由。
  • I listed the affected browsers actually tested and identified any required follow-up owner. / 我已列出实际测试的受影响浏览器,并标明所有必需补测的负责人。

Summary by CodeRabbit

  • Bug Fixes
    • Improved reliability when closing, switching, or disabling features by consistently releasing associated resources.
    • Cleanup tasks now run in a predictable order, helping prevent lingering listeners, notifications, drafts, plugins, and other feature state.
    • A failure in one cleanup task no longer prevents remaining cleanup actions from running.
    • Improved handling of repeated cleanup requests and feature disablement.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds ordered cleanup positions and a CleanupManager. Content initialization registers feature teardown callbacks with the manager, supports fork cleanup withdrawal, and executes all registered cleanups from the unload handler.

Changes

Cleanup lifecycle

Layer / File(s) Summary
Cleanup manager contract and validation
src/core/types/cleanupPositions.ts, src/core/utils/cleanupManager.ts, src/core/utils/__tests__/cleanupManager.test.ts
Adds ordered cleanup stages and a manager that registers, withdraws, orders, executes, and releases cleanup functions. Tests cover registration, ordering, idempotence, withdrawal, and error behavior.
Content cleanup registration
src/pages/content/index.tsx
Registers feature, listener, storage, account, plugin, and fork cleanup callbacks with ordered positions. Fork cleanup can be withdrawn when disabled. The unload handler delegates teardown to cleanupManager.executeCleanups().

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ContentIndex as content/index.tsx
  participant CleanupManager
  participant CleanupFunctions as registered cleanup functions
  ContentIndex->>CleanupManager: register cleanup callbacks with positions
  ContentIndex->>CleanupManager: executeCleanups on beforeunload
  CleanupManager->>CleanupFunctions: invoke callbacks in position order
  CleanupManager-->>ContentIndex: rethrow the last cleanup error, if any
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR adds the cleanup manager, integrates it into the entrypoint, preserves cleanup ordering, and addresses issue #897.
Out of Scope Changes check ✅ Passed The enum, manager, tests, and entrypoint integration directly support the cleanup refactor and linked issue #897.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly summarizes the refactoring of repetitive cleanup boilerplate at the project entrypoint.
Description check ✅ Passed The description covers the goal, issue, testing, implementation details, checklist, and verification status required by the template.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@andy-ish andy-ish changed the title [WIP] Refactor/entrypoint refactor: clean repetitive boilerplate code at project entrypoint Aug 4, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 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 `@src/core/types/cleanupPositions.ts`:
- Around line 1-24: Update CleanupPositions and its consumers so
CleanupManager.executeCleanups() preserves the legacy registration order,
particularly ensuring CleanupAccountContextBridge runs before CleanupPluginHost
and all other existing dependencies retain their prior sequence. Reorder the
enum values to match that order, or add coverage that verifies the intended
cleanup dependency ordering.

In `@src/core/utils/cleanupManager.ts`:
- Around line 56-71: Update executeCleanups in
src/core/utils/cleanupManager.ts:56-71 to track whether a cleanup catch occurred
separately from the captured error, then rethrow whenever that flag is set so
falsy values are preserved exactly. In
src/core/utils/__tests__/cleanupManager.test.ts:73-87, add a falsy-error case
verifying that a later cleanup still runs and the exact falsy value is rethrown.
- Around line 44-45: Update the list() method in the cleanup manager to remove
the incompatible as const assertion and return the copied cleanups as the
declared mutable Array<Cleanup> type.
🪄 Autofix

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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1f5e152f-07e7-4962-a830-d814006241d5

📥 Commits

Reviewing files that changed from the base of the PR and between 5f721f8 and f9f379e.

📒 Files selected for processing (4)
  • src/core/types/cleanupPositions.ts
  • src/core/utils/__tests__/cleanupManager.test.ts
  • src/core/utils/cleanupManager.ts
  • src/pages/content/index.tsx

Comment on lines +1 to +24
export enum CleanupPositions {
RemoveUnhandledRejectionEventListener,
RemoveErrorEventListener,
StopWatermarkRemover,
DestroyFolderManagerInstance,
DestroyPromptManagerInstance,
DestroySlashPromptFeatureInstance,
CleanupQuoteReply,
CleanupInputVimMode,
CleanupSendBehavior,
CleanupDraftSave,
CleanupFork,
CleanupGemsSidebar,
CleanupResponseCompleteNotification,
CleanupEdgeFinalVersionNotice,
CleanupPluginHost,
CleanupBrandTheme,
CleanupRemoteAnnouncements,
CleanupStorageQuotaWarning,
CleanupAccountContextBridge,
CleanupCodeBlockCollapse,
CleanupUsageStatus,
RemoveStorageOnChangedListener,
}

Copy link
Copy Markdown

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

upstream="$(git rev-parse --abbrev-ref --symbolic-full-name '@{upstream}' 2>/dev/null || true)"
if [[ -n "$upstream" ]]; then
  base="$(git merge-base HEAD "$upstream")"
elif git rev-parse --verify HEAD^ >/dev/null 2>&1; then
  base="HEAD^"
else
  echo "No comparison base is available."
  exit 0
fi

git diff --unified=100 "$base"...HEAD -- \
  src/pages/content/index.tsx \
  src/core/types/cleanupPositions.ts

Repository: Nagi-ovo/voyager

Length of output: 154


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- repository state ---'
git status --short
printf '%s\n' '--- recent commits ---'
git log --oneline -8
printf '%s\n' '--- cleanup-related files ---'
git ls-files | rg '(^|/)(cleanup|Cleanup)|src/pages/content/index\.tsx$' || true
printf '%s\n' '--- cleanup symbol references ---'
rg -n --hidden --glob '!node_modules' --glob '!dist' \
  'CleanupPositions|executeCleanups|beforeunload|RemoveUnhandledRejectionEventListener|RemoveErrorEventListener' .

Repository: Nagi-ovo/voyager

Length of output: 11255


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- cleanup-related commit summaries ---'
git show --stat --oneline --no-renames 7b621e2f
git show --stat --oneline --no-renames b951e9e2
git show --stat --oneline --no-renames 82150698

printf '%s\n' '--- entrypoint changes across cleanup commits ---'
git show --format=fuller --no-ext-diff --unified=12 7b621e2f -- src/pages/content/index.tsx src/core/types/cleanupPositions.ts src/core/utils/cleanupManager.ts
git show --format=fuller --no-ext-diff --unified=12 b951e9e2 -- src/pages/content/index.tsx src/core/types/cleanupPositions.ts src/core/utils/cleanupManager.ts
git show --format=fuller --no-ext-diff --unified=12 82150698 -- src/pages/content/index.tsx src/core/types/cleanupPositions.ts src/core/utils/cleanupManager.ts

Repository: Nagi-ovo/voyager

Length of output: 27105


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- cleanup manager implementation ---'
cat -n src/core/utils/cleanupManager.ts

printf '%s\n' '--- previous entrypoint teardown ---'
git show 7b621e2f^:src/pages/content/index.tsx | sed -n '620,760p'

printf '%s\n' '--- current entrypoint teardown and registrations ---'
sed -n '540,750p' src/pages/content/index.tsx

Repository: Nagi-ovo/voyager

Length of output: 12966


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- previous cleanup registrations in source order ---'
git show 7b621e2f^:src/pages/content/index.tsx |
  nl -ba |
  rg 'registerCleanupFunction|registerCleanupFunctionAndReturnIt'

printf '%s\n' '--- current cleanup registrations in source order ---'
nl -ba src/pages/content/index.tsx |
  rg 'registerCleanupFunction|registerCleanupFunctionAndReturnIt'

printf '%s\n' '--- previous cleanup registrations with context ---'
git show 7b621e2f^:src/pages/content/index.tsx |
  nl -ba |
  rg -C 3 'registerCleanupFunction|registerCleanupFunctionAndReturnIt'

Repository: Nagi-ovo/voyager

Length of output: 245


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- previous cleanup registrations in source order ---'
git show 7b621e2f^:src/pages/content/index.tsx |
  grep -nE 'registerCleanupFunction|registerCleanupFunctionAndReturnIt' || true

printf '%s\n' '--- current cleanup registrations in source order ---'
grep -nE 'registerCleanupFunction|registerCleanupFunctionAndReturnIt' src/pages/content/index.tsx || true

printf '%s\n' '--- previous cleanup registrations with context ---'
git show 7b621e2f^:src/pages/content/index.tsx |
  grep -n -E -B3 -A3 'registerCleanupFunction|registerCleanupFunctionAndReturnIt' || true

Repository: Nagi-ovo/voyager

Length of output: 11873


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
import re
from pathlib import Path

enum_text = Path("src/core/types/cleanupPositions.ts").read_text()
names = re.findall(r"^\s{2}([A-Za-z][A-Za-z0-9_]*),?$", enum_text, re.M)
positions = {name: index for index, name in enumerate(names)}

legacy_gemini_order = [
    "CleanupAccountContextBridge",
    "CleanupPluginHost",
    "CleanupBrandTheme",
    "RemoveUnhandledRejectionEventListener",
    "RemoveErrorEventListener",
    "CleanupRemoteAnnouncements",
    "CleanupStorageQuotaWarning",
    "RemoveStorageOnChangedListener",
    "DestroySlashPromptFeatureInstance",
    "CleanupEdgeFinalVersionNotice",
    "DestroyFolderManagerInstance",
    "CleanupInputVimMode",
    "CleanupSendBehavior",
    "CleanupQuoteReply",
    "StopWatermarkRemover",
    "CleanupResponseCompleteNotification",
    "CleanupDraftSave",
    "CleanupGemsSidebar",
    "CleanupUsageStatus",
    "CleanupCodeBlockCollapse",
    "CleanupFork",
    "DestroyPromptManagerInstance",
]

actual = [positions[name] for name in legacy_gemini_order]
inversions = [
    (legacy_gemini_order[i], legacy_gemini_order[j])
    for i in range(len(actual))
    for j in range(i + 1, len(actual))
    if actual[i] > actual[j]
]

print("Enum positions:")
for name in legacy_gemini_order:
    print(f"{name}: {positions[name]}")
print(f"Legacy order preserved: {not inversions}")
print("First ordering differences:")
for left, right in inversions[:12]:
    print(f"{left} must run before {right}, but the enum runs them in the opposite order")
PY

Repository: Nagi-ovo/voyager

Length of output: 2231


Preserve the legacy cleanup order. CleanupManager.executeCleanups() previously used registration order because every cleanup had position -1. The enum reverses existing ordering; for example, CleanupAccountContextBridge was registered before CleanupPluginHost, but positions 18 and 14 execute them in the opposite order. Reorder the enum or add tests for the intended dependency order.

🤖 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/core/types/cleanupPositions.ts` around lines 1 - 24, Update
CleanupPositions and its consumers so CleanupManager.executeCleanups() preserves
the legacy registration order, particularly ensuring CleanupAccountContextBridge
runs before CleanupPluginHost and all other existing dependencies retain their
prior sequence. Reorder the enum values to match that order, or add coverage
that verifies the intended cleanup dependency ordering.

Comment on lines +44 to +45
list(): Array<Cleanup> {
return [...this.cleanups] as const;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -C 2 \
  'list\(\): Array<Cleanup>|return \[\.\.\.this\.cleanups\] as const' \
  src/core/utils/cleanupManager.ts

# Then run the repository's normal TypeScript type-check job locally or in CI.
# Expect no readonly-array assignment error for src/core/utils/cleanupManager.ts.

Repository: Nagi-ovo/voyager

Length of output: 323


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- cleanupManager.ts ---'
cat -n src/core/utils/cleanupManager.ts | sed -n '1,90p'

printf '%s\n' '--- project type-check configuration ---'
for f in package.json tsconfig.json; do
  if [ -f "$f" ]; then
    printf '%s\n' "--- $f ---"
    cat -n "$f" | sed -n '1,220p'
  fi
done

printf '%s\n' '--- TypeScript tooling availability ---'
command -v tsc || true
tsc --version 2>/dev/null || true

Repository: Nagi-ovo/voyager

Length of output: 9253


🏁 Script executed:

#!/bin/bash
set -uo pipefail

printf '%s\n' '--- repository type-check ---'
tsc --noEmit --pretty false 2>&1
status=$?
printf 'tsc_exit=%s\n' "$status"

printf '%s\n' '--- isolated return-type check ---'
tmp="$(mktemp --suffix=.ts)"
trap 'rm -f "$tmp"' EXIT
cat >"$tmp" <<'TS'
interface Cleanup {
  pos: number;
  func: () => void;
}
class CleanupManager {
  private cleanups: Array<Cleanup> = [];
  list(): Array<Cleanup> {
    return [...this.cleanups] as const;
  }
}
TS
tsc --noEmit --strict --target esnext --module esnext --pretty false "$tmp" 2>&1
printf 'isolated_tsc_exit=%s\n' "$?"

Repository: Nagi-ovo/voyager

Length of output: 2088


🏁 Script executed:

#!/bin/bash
set -uo pipefail

tmp="$(mktemp --suffix=.ts)"
trap 'rm -f "$tmp"' EXIT
cat >"$tmp" <<'TS'
interface Cleanup {
  pos: number;
  func: () => void;
}
class CleanupManager {
  private cleanups: Array<Cleanup> = [];
  list(): Array<Cleanup> {
    return [...this.cleanups] as const;
  }
}
TS

tsc --ignoreConfig --noEmit --strict --target esnext --module esnext --pretty false "$tmp" 2>&1
printf 'isolated_tsc_exit=%s\n' "$?"

Repository: Nagi-ovo/voyager

Length of output: 174


🏁 Script executed:

#!/bin/bash
set -uo pipefail

tmp="$(mktemp --suffix=.ts)"
trap 'rm -f "$tmp"' EXIT
cat >"$tmp" <<'TS'
const direct: number[] = [1, 2] as const;

const source: number[] = [];
const spread: number[] = [...source] as const;

interface Cleanup {
  pos: number;
  func: () => void;
}
class CleanupManager {
  private cleanups: Array<Cleanup> = [];
  list(): Array<Cleanup> {
    return [...this.cleanups] as const;
  }
}
TS

tsc --ignoreConfig --noEmit --strict --target esnext --module esnext --pretty false "$tmp" 2>&1
printf 'probe_tsc_exit=%s\n' "$?"

Repository: Nagi-ovo/voyager

Length of output: 171


🏁 Script executed:

#!/bin/bash
set -uo pipefail

printf '%s\n' '--- available runtimes and local dependencies ---'
command -v bun || true
bun --version 2>/dev/null || true
command -v node || true
node --version 2>/dev/null || true
if [ -d node_modules/typescript ]; then
  node -p "require('./node_modules/typescript/package.json').version" 2>/dev/null || true
else
  printf '%s\n' 'node_modules/typescript: absent'
fi

printf '%s\n' '--- lockfile TypeScript entries ---'
for f in bun.lock bun.lockb package-lock.json yarn.lock pnpm-lock.yaml; do
  if [ -f "$f" ]; then
    printf '%s\n' "--- $f ---"
    rg -n -C 2 'typescript@|typescript:' "$f" | head -80
  fi
done

Repository: Nagi-ovo/voyager

Length of output: 829


🌐 Web query:

TypeScript 5.8 readonly tuple as const assignable to mutable array TS4104

💡 Result:

The error TS4104 occurs in TypeScript when you attempt to assign a readonly array or tuple (often created via as const) to a location that expects a mutable array [1][2][3]. This error exists because readonly types are not assignable to mutable types [4][5]. A mutable type (e.g., T[]) implies that the array can be modified (elements added, removed, or reordered), whereas a readonly type (e.g., readonly T[]) guarantees that it will not be [4]. Allowing this assignment would be unsafe because the consuming code might attempt to mutate the array, violating the readonly contract [4]. To resolve this, you can use one of the following approaches depending on your requirements: 1. Spread the array into a fresh literal: This creates a new, mutable copy of the array elements [6]. const mutableArray = [...myReadonlyTuple]; 2. Cast the value to a mutable type: If you are certain the consuming code will not mutate the array, or if you simply need to satisfy the type checker, you can cast it [7][5]. const mutableArray = myReadonlyTuple as any[]; // Or more safely: const mutableArray = myReadonlyTuple as T[]; 3. Update the consuming type: If you own the code consuming the array, change the type definition to accept a readonly array, which is generally considered better practice for functions that do not intend to modify their inputs [4][7]. function process(data: readonly T[]) {... } The TS4104 error was more prominent in earlier versions of TypeScript (around 5.0-5.1) following stricter checks on readonly-to-mutable assignments [8][9][10]. While the compiler does not automatically "strip" readonly for you [11], using a spread operator is the idiomatic way to produce a mutable array from a readonly one [6].

Citations:


Remove the incompatible as const assertion.

list() returns a readonly array, but its return type is mutable Array<Cleanup>. TypeScript 5.9.3 rejects this assignment.

Proposed fix
   list(): Array<Cleanup> {
-    return [...this.cleanups] as const;
+    return [...this.cleanups];
   }
📝 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.

Suggested change
list(): Array<Cleanup> {
return [...this.cleanups] as const;
list(): Array<Cleanup> {
return [...this.cleanups];
🤖 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/core/utils/cleanupManager.ts` around lines 44 - 45, Update the list()
method in the cleanup manager to remove the incompatible as const assertion and
return the copied cleanups as the declared mutable Array<Cleanup> type.

Comment thread src/core/utils/cleanupManager.ts Outdated
@Nagi-ovo

Nagi-ovo commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Thanks! The failing watermark test was a flaky test inherited from main, not caused by this PR. It has been fixed on main in d139473. Please rebase this branch onto the latest main and push the updated branch to trigger a fresh CI run.

@andy-ish

andy-ish commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

已从 upstream 仓库将最新代码同步到 head branch (4337dfd)。

并修复 cleanupManager 会无视抛出假值异常的清理函数的问题 (057a71c)。

Co-authored-by: Codex <codex@users.noreply.github.com>
@Nagi-ovo

Nagi-ovo commented Aug 7, 2026

Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: b17c614cc9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Nagi-ovo Nagi-ovo left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

已核对清理顺序与旧 beforeunload 顺序一致,并补充生产 enum 顺序回归测试。当前 head 的本地验证、CI、Codex 和 CodeRabbit 均无阻塞问题。

@Nagi-ovo
Nagi-ovo merged commit f0f9c37 into Nagi-ovo:main Aug 7, 2026
15 checks passed
@Nagi-ovo

Nagi-ovo commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Thanks so much!

@andy-ish
andy-ish deleted the refactor/entrypoint branch August 7, 2026 23:05
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.

[Feature] 重构:清理 src/pages/content/index.tsx 里的大量重复性代码

2 participants