GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — refactor: BacklinkPanel.tsx の targetPageName を useMemo 化 (#237) by ymnao · Pull Request #243 · ymnao/scripta Conversation
Owner
概要
関連 IssueCloses #237 移行 Stage該当なし (Phase 2 後の内部 quality 改善)。 変更内容
動作確認
スクリーンショットUI 変更なし。
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions`targetPageName = basename(targetFilePath).slice(0, -3).normalize("NFC")` を
毎 render 計算していたため、`normalize("NFC")` が collapse toggle / fileTreeVersion
bump / contentVersion bump 等の度に短命 string allocation を発生させていた。
`useMemo([targetFilePath])` で memoize し、targetFilePath 不変時は再計算を抑止。
issue の提案 snippet (line 94 で wrap) は早期 return (line 81-89) より後ろで
hook を呼ぶ Rules of Hooks 違反になるため、targetFilePath useMemo の直後 (line 41)
に移動。null fallback として "" を返す (panel は targetFilePath null 時に早期
return するため、targetPageName は読まれない)。
Uh oh!
There was an error while loading. Please reload this page.
ymnao
added a commit
that referenced
this pull request
- package.json の version を 0.6.0 → 0.7.0 に bump - CHANGELOG.md に v0.7.0 エントリを追加 (#243 〜 #280) - Fixed: FileTree scroll regression (#276)、electron e2e launch teardown timeout 拡大 (#247) - Internal: #209 3 項目 (drift-lock 系 refactor #278/#279/#280)、settings setter 集約 (#273 → #277)、search/workspace/backlink 系 helper 抽出 15 件 - Dependencies: electron 43.0.0 / p-limit 7.3.0 major bump (#275)、Dependabot 7 件 combine (#274)、pnpm-workspace.yaml overrides で @codemirror dual copy を恒久防止 Co-authored-by: Claude Opus 4.7 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersNo reviewsUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. refactor: BacklinkPanel.tsx:94 の targetPageName を useMemo 化Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |