BubbleSpace の hook:依存漏れ・ドラッグ中の全描き直し・副作用の後始末
Maintainers usually reply within 12 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- react, typescript
- Domain
- frontend, performance, testing
Research direction
Start with the linked sections of BubbleSpace.tsx, then read useBubbleInput.ts, BubbleField.tsx, useSpaceViewState.ts, and ShoreSpace.tsx at the cited locations. Check the hook tests (the issue says none exist) and trace the reported dependencies, drag rendering, cleanup, preset synchronization, and external-world path. Done means the agreed fixes or removal are covered by tests, including lifecycle and repeated updates.
Written by the indexing model from the issue text.
Description
bubble-layout-feature の BubbleSpace と周りの hook で、React の依存・副作用・描き直しの量に関するものです。いちばん壊れやすい所なのに hook のテストが 1 本も無いので、あわせて足したいです。
1. useCallback / useMemo の依存漏れ
- BubbleSpace.tsx:652(
openBubble):listHostsが依存に無い。海の記憶から戻してlistHostsだけ増えたとき、札から開くと一覧の「中」に開き、次のsetChildrenで extra として消される(focusOnが新しい世界を返すなら自然に直るので要確認) - BubbleSpace.tsx:1293(
renderBubble):dressed/base/openArea/chooseView/toggleFollowsが依存に無い。選択だけ変わって世界が変わらないとbl-grownが付かず、中身の開始位置が 27px ずれる(要確認) useBubbleInput.ts:617:o.dressed/o.onDragInfo(影響は小)
2. ドラッグ中の 1 フレームごとに、木ぜんぶが描き直される(性能)
setWorld のたびに:api(openBubble などが world に依存)が新しくなる → renderBubble が作り直され、全部の泡の route.Component が描き直される → LegacyScreen の legacyContext(space に依存)を読む中身も全部 → ShoreSpace は onReady から setSpace を受けるので自分ごと。窓の入れ子や重い旧画面が多いとカクつく。
3. useMemo の中の副作用・後始末
noTween(BubbleSpace.tsx:541-548)が useMemo の中で ref を書き換えている- overscroll の rAF をアンマウント時に止めていない(
BubbleSpace.tsx:506-518) - 帯のホバーが解けない(
BubbleField.tsx:79-82, 114-115):層から外へ出たとき pointerout の target(泡)が残るのでhoveredIdが解けず、帯が出たままになる
4. 並べ方の口が世界と同期しない
useSpaceViewState.tsのpresetは世界から同期されないので、世界線で戻してもセレクトが古いままShoreSpace.tsx:483のsetPresetがspaceIdを渡していない
5. 使っていない「外で世界を持つ」経路が壊れている
BubbleSpace.tsx:429-435:onChange のとき関数での書き込みを worldRef.current から作るので、同じ拍の 2 回目が 1 回目を消す。restore(:395)は依存が [] で古い setWorld を掴む。いまは誰も world / onChange を渡していないので、直すか消す。
(行番号は main d41a42da 時点)
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- Avg merge
- 9d 13h
- Merged PRs (30d)
- 10
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fumicode/bublys-org
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
fumicode/bublys-org#261 ·
Maintainers usually reply within 12 days
-
enhancement Shiftonton
Difficulty 5/5 Over a week Newbie friendliness 15/100
fumicode/bublys-org#259 ·
Maintainers usually reply within 12 days
-
enhancement Shiftonton
Difficulty 3/5 1-2 days Newbie friendliness 42/100
fumicode/bublys-org#258 ·
Maintainers usually reply within 12 days
-
enhancement Shiftonton
Difficulty 4/5 3-5 days Newbie friendliness 25/100
fumicode/bublys-org#257 ·
Maintainers usually reply within 12 days
-
enhancement Shiftonton
Difficulty 4/5 3-5 days Newbie friendliness 55/100
fumicode/bublys-org#256 ·
Maintainers usually reply within 12 days
All issues in fumicode/bublys-org
Similar issues
-
bug
Difficulty 2/5 Half a day Newbie friendliness 62/100
garethgeorge/backrest#1451 ·
Maintainers usually reply within 1 day
-
fix(core): \.pluck() returns values in key insertion order instead of requested argument orderPossibly taken @ManyaS-Git claimed this 1 day ago. Openstatus:in-linear
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
n8n-io/n8n#45027 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 13 days
-
bug
Difficulty 2/5 Half a day Newbie friendliness 68/100
navikt/skjemabygging-formio#2399 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
lidofinance/validator-ejector#233 ·
Maintainers usually reply within 1 day