feat: 再レイアウトボタン(Dagre を手動で再実行)の追加
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start by locating graphStore.ts and the toolbar component, then trace the existing Dagre layout trigger and SAVE_LAYOUT handling. Verify how layoutAlgorithm, focus mode, and search state affect the graph. Done means the toolbar action resets local and host-persisted positions, reruns the current layout, and passes npm run check.
Written by the indexing model from the issue text.
Description
概要
ノードを手動でドラッグして配置が乱れたとき、ワンクリックで Dagre 自動レイアウトに戻せる「再レイアウト」ボタンをツールバーに追加する。
現状は一度ノードを動かすと layoutState に位置が記録され、Dagre が再実行されなくなる。リセット手段がないためパネルを閉じて開き直すしか方法がない。
タスク
- ツールバー(右上)に「再レイアウト」ボタンを追加
- ボタン押下で以下を実行:
layoutStateを全クリア(useGraphStore.getState().clearLayoutState())SAVE_LAYOUTで空の positions を送信して拡張ホスト側の永続化もリセット- 現在の
layoutAlgorithm(LR or TB)で Dagre を再実行
-
GraphStoreにclearLayoutState()アクションを追加
// graphStore.ts に追加
clearLayoutState() {
set({ layoutState: {} });
},
UI イメージ
[ テスト非表示 ] [ MPkg非表示 ] [ → LR | ↓ TB ] [ ⟳ 再レイアウト ]
完了条件
- 「再レイアウト」ボタンを押すと Dagre が再実行され整列される
- 再レイアウト後のノード位置が
SAVE_LAYOUTで永続化される - フォーカスモード中・検索中でも動作する
-
npm run checkが全てグリーン
依存
- fix: ノードドラッグ時レイアウト崩れバグ(
clearLayoutStateの仕組みを共有)
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
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 qnaiv/codegraph
-
enhancement ui
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
enhancement ui
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
phase-4 whiteboard
Difficulty 4/5 3-5 days Newbie friendliness 58/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·