Repository navigation
feat(graph): interactive node drag, 3-tier focus hierarchy, local graph, search, and sidebar sync - #69
Merged
Conversation
…highlighting, and frame cluster panel
…ter, context menu and i18n
Conflict resolution: keep the branch's sidebar module split
(sidebar/{mod,tree,dnd}.rs) and its function structure, and carry main's
v2.12 sidebar features (pinned pages, recents, sort menu) plus the
v2.12.2 drag-and-drop fixes, which the branch predated:
- drop-target probing in tree.rs uses contains_pointer() and rows carry
the stable page-row id (egui suppresses hovered() for every widget
while a drag is in flight);
- the root drop zone in dnd.rs is probed with contains_pointer();
- the stale-drag cleanup at the top of draw_sidebar survived the merge;
- main's headless sidebar drag tests (drop emits reparent, cycle drop
rejected, lost release cannot stick) ride along on draw_sidebar and
pass against the new module structure.
Cargo.lock taken from main and regenerated. Tests: 333 passed.
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary / Краткое описание
Комплексное интерактивное улучшение графа связей и синхронизации с сайдбаром для нативного клиента CapsuleCraft (
native/src/graph/,native/src/views/graph/,native/src/views/sidebar/).Архитектурная документация для мейнтейнера добавлена в
docs/NATIVE_INTERACTIVE_GRAPH.md.Что сделано / Key Features
1. Архитектурная декомпозиция монолитов (Лимит 500–800 строк на файл)
Монолиты
graph.rs(1,361 строк),graph_view.rs(1,209 строк) иsidebar_view.rs(1,150 строк) разделены на компактные, модульные компоненты:native/src/graph/:mod.rs(571),layout.rs(480),metrics.rs(313).native/src/views/graph/:mod.rs(779),render_pages.rs(388),render_clusters.rs(347),interaction.rs(107),render_density.rs(97).native/src/views/sidebar/:mod.rs(718),tree.rs(377),dnd.rs(98).2. Изолированный$O(1)$ драг узлов и сохранение координат
drag_overrides: HashMap<u32, [f32; 2]>.PositionCache(graph_layout.json) при отпускании мыши (drag_stopped).Grab/Grabbing.3. Трёхслойная модель фокуса (3-Tier Focus Hierarchy) и сброс выделения
Устранено постоянное 20% затемнение хранилища:
4. Режим «Локальный граф» (Local Graph Mode)
neighborhood_bfsпо предвычисленному списку смежностиadjacencyвGraphMetrics.5. Поиск по графу и фильтр сирот
LABEL_MAX).6. Контекстное меню по правой кнопке мыши (ПКМ)
capsule://...), «Копировать [[вики-ссылку]]» (с тостами).7. Двусторонняя синхронизация с сайдбаром (Zero-Main Bloat)
expand_ancestors.response.scroll_to_me(Some(egui::Align::Center))при клике на узел графа.NativeAppи файлеmain.rs.8. Адаптивные плашки на
egui::Frameи векторный UIpainter.rectна самоадаптирующиесяegui::Frame(панель кластеров и карточка выбранной страницы) — предотвращает выпадение текста и тегов за границы при переносе длинных названий.●,✓,⚙,🔍) в пользу векторных примитивов и системныхIcon.Тестирование и верификация
cargo test --manifest-path native/Cargo.toml --lib -j 1320 passed; 0 failed; 2 ignored; finished in 0.94scargo build --manifest-path native/Cargo.toml --bin capsuleos-native --release -j 1завершена с кодом0(бинарник 32.3 МБ проверен локально).english_strings_are_cyrillic_freeиevery_key_has_both_languagesпройдены без ошибок.