You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(acp/editor/ui): remove runtime ACP permission mode switch and stabilize diff/editor behavior
Summary:
- Remove frontend/backend runtime API for ACP permission mode switching (acp:set_permission_mode).
- Keep backend startup-level permission mode via ANYCODE_ACP_PERMISSION_MODE (full_access by default, ask optional at process start).
- Consolidate editor diff-mode ownership inside useEditors and persist per-pane diff mode in local storage.
- Improve Changes panel active/selected state handling and keyboard navigation semantics.
- Clean up debug logs and minor focus/activation behavior in editor UI.
Detailed changes (bugs/fixes/refactors):
1) ACP permission mode pipeline simplification
- Removed App-level forced emit for acp:set_permission_mode on reconnect.
- Removed backend socket handler registration for acp:set_permission_mode.
- Removed ACP permission-mode request handler and related request type from acp_handler.
- Removed now-unused frontend permission-mode storage helpers and AcpPermissionMode type wiring in settings flow.
- Behavior after change: permission mode is determined at backend startup from env only.
2) Diff mode architecture refactor (App -> useEditors)
- Moved per-pane diff mode state and mode-cycling logic into useEditors.
- Added persisted editorDiffModeByPane state and helper API: getEditorDiffMode / setEditorDiffMode / cycleEditorDiffMode.
- Updated openFile flow to accept explicit diffMode and consistently apply mode when restoring/reopening files.
- Added guarded re-application of pane/file diff state to avoid redundant updates.
3) Changes panel behavior and UX updates
- Introduced explicit selectedFilePath separate from activeFilePath (active editor file).
- Improved arrow key navigation + Enter activation against selected item.
- Added active-file mapping from editor active file to git changed file (normalized path compare).
- Updated styles for selected row treatment and tighter file-stat spacing.
4) Editor interaction and rendering tweaks
- Ensure pane activation on wheel capture in EditorPanel (better focus ownership in multi-pane setups).
- Ensure cursor/selection visual refresh after focus restoration in editor base.
- Removed leftover debug console logs from click/selection handlers.
- Adjusted renderer bottom padding behavior in scroll-into-view routine.
5) ACP settings/agents cleanup
- Removed permission mode controls from ACP settings UI and related prop plumbing in AgentPanel/App.
- Simplified useAgents dependencies by removing disabled follow-mode/open-file coupling.
Notes:
- Frontend build and backend cargo check pass after these changes.
0 commit comments