AppFlowy-IO / AppFlowy-IO/AppFlowy
[Bug] Home stack tab and secondary-view interaction state can become stale
- 主要言語
- Dart
- スター
- 76.6k
- フォーク
- 6k
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
### Bug Description
The desktop home stack does not consistently clean up or synchronize its interaction state.
The secondary-view resize handle starts a delayed hover callback that can run after the widget has been disposed. A canceled resize gesture can also leave the divider highlighted, and the secondary-view AnimationController is not disposed.
In addition, HomeStack maintains a local selected index while the tab bar uses TabsState.currentIndex. Closing, programmatically selecting, or reordering tabs can therefore make the selected tab disagree with the visible page. The floating action used to reopen the secondary view is also pointer-only and displays an incorrect icon.
### How to Reproduce
Scenario 1: delayed hover callback
1. Open a secondary view.
2. Move the pointer onto the divider between the primary and secondary views.
3. Close or replace the view before the 500 ms hover delay completes.
4. A delayed callback may attempt to call setState after the widget has been disposed.
Scenario 2: canceled resize
1. Open a secondary view.
2. Start dragging the divider.
3. Interrupt or cancel the gesture.
4. The divider can remain in its active highlighted state.
Scenario 3: tab state synchronization
1. Open three tabs.
2. Select the final tab.
3. Close, pin, or reorder tabs.
4. Compare the highlighted tab with the visible page.
5. The selected tab and visible page can become inconsistent.
Scenario 4: keyboard accessibility
1. Hide the secondary view.
2. Use only the keyboard to focus and activate the floating reopen action.
3. The action cannot be operated like a standard button.
### Expected Behavior
The secondary view should cancel pending callbacks and animations when it is removed.
A canceled resize gesture should always clear its active visual state. The visible page should always follow TabsState.currentIndex and preserve the correct page identity after tabs are closed or reordered.
The secondary-view reopen action should support pointer, keyboard, focus, tooltip, and semantic interaction, and it should display the correct directional sidebar icon.
### Operating System
Windows 11
### AppFlowy Version(s)
Source build from main at commit 5cf3a365d
### Screenshots
_No response_
### Additional Context
I found these problems while auditing the lifecycle and interaction state in home_stack.dart.
I have prepared a candidate fix and focused widget regression tests for disposal during the delayed hover callback and resize gesture cancellation. I would like to work on this issue and submit a draft pull request.
If the maintainers prefer the tab synchronization and secondary-view lifecycle changes to be split into separate pull requests, I am happy to adjust the scope.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Start with home_stack.dart and the focused widget regression tests mentioned in the issue. Trace the secondary-view hover, resize, animation, tab-selection, and reopen-action state from their lifecycle and interaction entry points. Done means disposal is safe, canceled gestures reset their visuals, the visible page follows TabsState.currentIndex, and the reopen action supports keyboard and semantic interaction with the correct icon.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- dart, flutter
- 領域
- accessibility, frontend, testing
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100