219 lines
19 KiB
Markdown
219 lines
19 KiB
Markdown
# Text workspace and diagnostics union: frozen source handoff
|
|
|
|
Local-only source candidate; compilation, tests, native behavior, packaging and integration are UNRUN. Parent owns review, compiler lease, integration and publication. No further source work is active.
|
|
|
|
## Immutable inputs and commits
|
|
|
|
- Worktree `.local/tu`, branch `codex/text-union-956atf-20260913`; clean after commit and again during handoff readback.
|
|
- Base `feab2020d8e5b6bfdb59c86ab4aee161617b8b6f` (includes reviewed PreviewScrolled correction).
|
|
- Workspace peer `2df7f580aa4bd728a728c83ac10e6ccc956ef069`.
|
|
- Diagnostics peer `9fd76aef3ae2810667d3f2b031fc43692fc04c89`, published evidence `32368713ef15272c697c7e6388dffc8a29bfae3e`; its parent `b4b860f2776aa8251306d83ff58362c0359176ef` has the same crates/scripts/Cargo inputs as 2df. No later defaults/source8 proposal imported.
|
|
- `74542ae2c1b7af3f4f34efcf6a9774822ba4858d`: workspace composition and captured drawer admission (20 files, +5480/-736).
|
|
- `16904398dbddda9c073b3c420807e406086ad2ea`: separately reviewable three retained-result assertions (2 files, +20/-3).
|
|
- FINAL `92ff99eb54b75a67c6320cad93d11790413bbd8d`: diagnostics/provenance/dependency composition, byte-current References presentation and accepted local-boundary hook (98 files, +35959/-208).
|
|
|
|
The intermediate first commit deliberately retains three old assertions; gate the coherent final source. Root source, AGENTS, PROJECT_GOAL, native fixtures and package configuration were not edited.
|
|
|
|
## Exact source delta and dependency scope
|
|
|
|
[Source inventory](text-union-source-inventory-20260913.json) records every base/final Git blob, byte count and SHA256: 107 changed paths, 85 new and 22 modified. Of these, 71 are exact published vendored files; 36 are other files. This is a source delta, not a new admitted compiler input map. SHA256: `a415cfeaa7a412bcb897ae779a45d7894efd8f77bed29a154de550b8ddd2f4e4`.
|
|
|
|
Cargo.toml adds only the iced_widget workspace exclusion and crates.io local patch. Cargo.lock removes only iced_widget 0.14.2 registry source and checksum, leaving root resolution/dependencies intact. Desktop Cargo.toml is unchanged (root already had unicode-segmentation). The 71 vendored files, including license, upstream manifest, patch rationale, original manifests, VCS metadata and SVG asset, match 9fd Git blobs byte for byte. Batch cat-file validation checked headers, sizes and each trailing LF. The published upstream modification is the read-only Content::with_editor accessor. Both Windows notice scripts are imported together. `.gitattributes` preserves exact vendor bytes. CLI change is comment-only; core discovery now derives diagnostics from original reachable bytes before UUID elaboration.
|
|
|
|
A new build recorder must cover the actual vendored dependency sources, manifests and included assets; the old 581-file root manifest is not sufficient by assumption. Core provenance production also changed, so old oracle/core equivalence must not be inferred from a version label.
|
|
|
|
## Composition and independent-review seams
|
|
|
|
The editor remains in permanent strip/Find/editor/drawer/status slots with retained sensor and input guard. Root source-editor palette, dynamic IDs, F2/F12, chooser/reference-input restrictions, KeyboardBoundary subscription partition and valid PreviewScrolled early dispatch remain. Root behavior, diagram, forms, context menu and style trees have no base-to-final diff.
|
|
|
|
Drawer Show/Hide/Resize captures document, source session and drawer visit. Rejection occurs before shared root boundaries. Source commands re-enter existing guarded root dispatch. The real compact Diagram Usages command now starts the root captured source query and existing diagram chooser, rather than the peer placeholder.
|
|
|
|
Accepted local Text mutations use the existing pending-reveal reconciliation and allocation-before hooks only after their own admission. See [explicit hook and positive-test diff](text-union-local-mutation-boundary-20260913.patch), SHA256 `26d3d86500dd0276c9e276fe8726da4d28b9f39dbdb082cce5108708a9b86fcb`. This is the exact 169-to-92 diff for text_workspace.rs and palette_union.rs; it also contains the annotation-snapshot accessor and debug test cfg changes. Hook call sites: admitted menu open/current dismiss, current Show/Hide, finite changed Resize, admitted ToggleFile, current diagnostic jump and admitted Drawer command. Dispatched commands use App::update; passive reference/preview measurements do not enter the hook. Review whether every accepted-local path should retire allocation/navigation; the positive mounted test explicitly requires this, while stale controls preserve them.
|
|
|
|
References exact-cache validity is computed once per visible References view and shared by stale summary and row enabled state. Early Choose also checks exact current source bytes before any source-interaction boundary. The new displayed-row negative changes either active or inactive bytes without advancing SnapshotKey, checks actual shaped Stale feedback, then proves a captured choice preserves pending reveal and other intent. Ordinary Workspace edits advance the key; this is an adversarial identity test, not a claimed observed runtime corruption.
|
|
|
|
Raw IncludesLoaded admission compares current entry and all retained file bytes before discovery metadata or diagnostic publication. Diagnostic decorations retain owned current-frame tooltip paragraphs for the deferred renderer. Chooser/modal availability suppresses diagnostic actions/hover details without removing current marks. Publication during rename leaves a real mounted preview report passive.
|
|
|
|
## Retention contract and preserved tests
|
|
|
|
Primary contract: `2df7f580:harness/text-workspace-interaction-contract-20260912.md`, especially retained results versus navigation permission and the permanent five-slot lifecycle. Independent source review: [retention review](text-retained-results-independent-review-20260913.md), SHA256 `22aaf828c514e7d58e6f7b0b3132ed43eefb736e4bde78a1529851e6cb89fc0b`. Parent accepted the following separate 169 assertions under that contract:
|
|
|
|
- `scoped_escape_retains_references_then_closes_them_without_losing_effective_selection`: second Escape hides the drawer, retains the exact result Arc and notice; Word/Line selection, replacement, Undo and exact source/model/history checks remain.
|
|
- `combined_modal_completion_releases_worker_without_navigation_or_model_changes`: exact current result Arc can finish behind modal; worker release and absence of navigation/source/model effects remain.
|
|
- `combined_reference_chooser_blocks_navigation_and_completion_precedes_reconciliation`: same retained-data rule, preserving chooser identity, early completion and absence of navigation effects.
|
|
|
|
All root 16 selection names remain. Root selection helper and four focus-fixture bytes are unchanged. Four accidentally duplicated peer departure bodies were removed from the parent tests.rs because byte-identical bodies already exist under root `tests/departure_selection.rs`; their hashes are in the inventory. Root child-module registration/paths are retained. No test has been counted twice to inflate the expected listing.
|
|
|
|
## Authored union evaluators (all UNRUN)
|
|
|
|
The inventory gives exact source path/name pairs. Seven union-specific cases exercise:
|
|
|
|
1. Stale captured/mounted drawer controls preserve pending navigation, source/evidence, camera and allocation intent.
|
|
2. Current Show/mounted Resize/Hide retire pending destination and advance allocation epoch while remaining live.
|
|
3. Compact Diagram Usages follows actual query completion into the existing captured chooser.
|
|
4. Independently wrong document/session/visit rejects each drawer action.
|
|
5. Actual chooser suppresses diagnostic action and mounted hover until closed; old publication remains rejected and a new target works.
|
|
6. Diagnostic publication during modal rename preserves actual fractional preview report and rounded painted coordinate without interaction/allocation changes.
|
|
7. Already displayed References with same key but changed active/inactive bytes shows Stale and rejects old Choose before boundaries.
|
|
|
|
Mounted annotation bridge uses the actual App snapshot/availability/raw clock and existing CPU graphics Editor/Recorder evaluator, copying Content for the renderer type. It does not claim a native window or the complete production sensor stack. Some mounted fixtures are debug-only, consistently with existing evaluator support.
|
|
|
|
Lexical source inventory: 91 added declarations and 5 removed, net +86 across core/desktop; core +2, desktop +89/-5 (net +84). This is NOT an actual Cargo listing. Three imported manual ignored tests are new: both source_annotations anchor witnesses and annotation_projection_cost_distributions. The seven authored union cases have no ignore marker. Existing manual exceptions remain. Future admission must derive exact runtime membership and ignores from the actual binary/configuration.
|
|
|
|
Five removed baseline names are explicitly replaced, not silently dropped: the three source_symbols close/completion/Escape tests become retention-contract cases; the two old source-header layout/scroll tests become permanent five-slot and retained editor-scroll tests. Their exact old/new names are listed in the inventory and appendix below.
|
|
|
|
## Verification and remaining acceptance
|
|
|
|
Completed source-only checks: standalone rustfmt (edition 2024, skip_children=true) for owned changed Rust paths; `git diff --check HEAD -- . ':!crates/vendor/iced_widget/**'`; exact 71-file vendor comparison; protected-path/root test-byte checks; clean Git status after final commit. Vendor formatting is intentionally untouched; upstream doc-comment whitespace is retained. No Cargo, rustc, tests, build, GUI, native, Gitea publication or integration was invoked for this union.
|
|
|
|
Parent/fresh critic should review 92ff and the hook/retention seams before issuing a compiler lease. Required next evidence includes actual full test listing/input capture, focused union/selection/rename/diagnostic/geometry tests, affected core provenance and notice tests, full/strict gates, then native compact layout, selection/edit/Undo, chooser/diagnostic hover, held-pointer replacement and Details/Preview continuation. Package notices and artifact pinning must reflect the local Iced dependency. Existing peer/native receipts remain evidence for their own pins only.
|
|
|
|
## Exact added/removed declaration names by file
|
|
|
|
### crates/oa-core/tests/source_files.rs
|
|
|
|
- Added `discovery_diagnoses_legacy_semantics_before_source_rewrite`
|
|
- Added `discovery_diagnostics_keep_raw_no_uuid_spans`
|
|
|
|
### crates/oa-desktop/src/app.rs
|
|
|
|
- Added `includes_loaded_diagnostics_use_raw_newly_discovered_bytes`
|
|
- Added `includes_loaded_diagnostics_use_retained_overlay_and_ignore_old_version`
|
|
- Added `includes_loaded_rejects_mismatched_retained_bytes_before_publication`
|
|
- Added `includes_loaded_requires_each_inactive_detached_overlay`
|
|
|
|
### crates/oa-desktop/src/app/source_rename/navigation_union_tests/palette_union.rs
|
|
|
|
- Added `compact_diagram_usages_command_uses_captured_query_and_existing_chooser`
|
|
- Added `current_compact_drawer_controls_and_mounted_resize_remain_live`
|
|
- Added `stale_compact_drawer_controls_preserve_current_navigation_and_evidence`
|
|
|
|
### crates/oa-desktop/src/app/source_rename/preview_scroll_tests.rs
|
|
|
|
- Added `diagnostic_publication_during_rename_keeps_actual_preview_report_passive`
|
|
|
|
### crates/oa-desktop/src/app/source_symbols/tests.rs
|
|
|
|
- Added `close_during_busy_retains_hidden_completion_without_reopening_or_navigation`
|
|
- Added `completion_retains_current_display_but_rejects_navigation_after_context_changes`
|
|
- Added `delayed_definition_after_hide_or_tab_change_retains_data_without_reopening_or_focus`
|
|
- Added `escape_hides_results_and_cancels_navigation_but_retains_latest_display`
|
|
- Added `hidden_completion_checks_exact_bytes_even_when_snapshot_key_was_not_advanced`
|
|
- Added `matching_old_worker_cannot_replace_a_newer_display_owner`
|
|
- Added `popup_escape_has_no_duplicate_bridge_and_dismissal_preserves_underlying_find_and_drawer`
|
|
- Added `retained_choices_cannot_replay_after_hide_or_references_problems_references`
|
|
- Added `same_key_changed_bytes_mark_retained_rows_stale_before_choice_boundaries`
|
|
- Added `same_worker_with_changed_request_envelope_cannot_publish_or_navigate`
|
|
- Removed `close_during_busy_hides_panel_and_completion_does_not_reopen_it`
|
|
- Removed `completion_rejects_file_edit_session_cursor_interaction_and_raw_input_changes`
|
|
- Removed `escape_dismisses_results_and_cancels_busy_navigation_without_changing_sources`
|
|
|
|
### crates/oa-desktop/src/app/text_workspace/lifecycle_tests.rs
|
|
|
|
- Added `canceled_or_failed_open_that_installs_nothing_retains_current_presentation_and_diagnostics`
|
|
- Added `invalid_repair_open_clears_prior_presentation_and_publishes_current_problems_preserving_worker`
|
|
- Added `saved_new_destination_does_not_revalidate_already_stale_warning_locations`
|
|
- Added `saved_new_destination_republishes_current_warning_and_refuses_old_primary_and_related`
|
|
|
|
### crates/oa-desktop/src/app/text_workspace/tests.rs
|
|
|
|
- Added `actual_chooser_blocks_diagnostic_actions_and_mounted_hover_until_closed`
|
|
- Added `annotation_snapshot_requires_exact_current_bytes_and_publication`
|
|
- Added `annotation_snapshot_tracks_real_file_round_trips_without_changing_model`
|
|
- Added `current_diagnostic_target_navigates_but_changed_source_or_clear_refuses_it`
|
|
- Added `diagnostic_span_must_be_loaded_ordered_and_utf8_exact`
|
|
- Added `disabled_entry_cannot_become_a_new_action_under_the_same_menu_token`
|
|
- Added `document_reset_preserves_popup_token_sequence_and_drops_old_menu_authority`
|
|
- Added `drawer_document_session_and_visit_guards_are_independently_required`
|
|
- Added `enabled_entry_is_readmitted_at_dispatch_and_blocked_by_busy`
|
|
- Added `equal_diagnostic_republication_invalidates_primary_and_related_targets`
|
|
- Added `menu_own_open_invalidation_does_not_stale_find_and_invoke_is_once`
|
|
- Added `menu_source_caret_document_path_and_interaction_changes_refuse_stale_find`
|
|
- Added `old_dismiss_and_invoke_do_not_consume_a_newer_menu`
|
|
- Added `only_valid_explicit_group_and_resize_intent_cancel_pending_navigation`
|
|
- Added `queued_group_toggle_cannot_mutate_a_reopened_or_rotated_visit`
|
|
- Added `queued_toolbar_request_cannot_retarget_after_source_change`
|
|
- Added `reference_groups_and_scroll_survive_tabs_and_reject_old_visits_and_queries`
|
|
- Added `reset_removes_ui_and_publication_authority_and_resize_rejects_nan`
|
|
- Added `retained_primary_and_related_targets_cannot_replay_after_hide_or_problems_references_problems`
|
|
- Added `source_and_property_drafts_keep_find_and_text_undo_without_model_application`
|
|
- Added `stale_retained_group_can_expand_without_navigating_or_applying_drafts`
|
|
|
|
### crates/oa-desktop/src/diagnostic_input/tests.rs
|
|
|
|
- Added `already_captured_terminal_cancels_child_without_activation_or_lingering_press`
|
|
- Added `captured_terminal_cancellation_preserves_same_publication_focusable_child_state`
|
|
- Added `current_primary_and_related_mouse_clicks_survive_same_publication_diff`
|
|
- Added `current_touch_activates_primary_and_related_and_cancel_does_not_activate`
|
|
- Added `fresh_mouse_press_after_missing_stale_release_can_activate_current_row`
|
|
- Added `hidden_zero_height_scroller_delivers_cancelled_mouse_and_touch_terminals_to_guard`
|
|
- Added `hidden_zero_size_list_consumes_release_outside_old_bounds_once`
|
|
- Added `missed_press_is_ignored_and_dragging_release_outside_does_not_activate`
|
|
- Added `negative_control_iced_button_retargets_a_press_after_plain_tree_diff`
|
|
- Added `negative_control_plain_focusable_row_migrates_activation_to_replacement`
|
|
- Added `negative_control_removing_unguarded_rows_exposes_background_release`
|
|
- Added `outer_scroll_offset_survives_same_and_changed_publications`
|
|
- Added `replaced_primary_and_related_rows_consume_stale_release_then_accept_new_click`
|
|
- Added `replaced_touch_consumes_lift_or_cancel_even_when_hidden`
|
|
- Added `same_publication_missing_terminal_recovers_on_fresh_mouse_or_touch_down`
|
|
- Added `same_publication_new_visit_cancels_armed_rows_without_a_hidden_tree_frame`
|
|
- Added `same_publication_preserves_focus_but_replacement_never_inherits_activation`
|
|
- Added `stale_release_does_not_bubble_to_real_background_controls`
|
|
- Added `stale_touch_release_does_not_disarm_a_new_current_gesture`
|
|
- Added `unrelated_finger_or_mouse_release_cannot_complete_another_fingers_press`
|
|
|
|
### crates/oa-desktop/src/source_annotations/anchor_tests.rs
|
|
|
|
- Added `final_multi_glyph_cluster_anchor_uses_logical_trailing_advance_edge`
|
|
- Added `mixed_direction_omitted_separator_has_one_logical_predecessor_anchor`
|
|
|
|
### crates/oa-desktop/src/source_annotations/layout_tests.rs
|
|
|
|
- Added `combining_cjk_and_bidi_ranges_cover_actual_clusters_without_neighbor_aliases`
|
|
- Added `empty_eof_and_separator_ranges_follow_real_paragraph_ownership`
|
|
- Added `mismatched_affected_source_and_bottom_line_without_visible_underline_have_no_bands`
|
|
- Added `omitted_wrap_space_has_one_preceding_run_anchor_and_none_when_that_run_is_clipped_out`
|
|
- Added `repeated_alias_marks_only_second_actual_glyph_sequence_and_blank_space_misses`
|
|
- Added `wrapped_scrolled_multiline_range_uses_actual_visible_runs_and_effective_clip`
|
|
|
|
### crates/oa-desktop/src/source_annotations/performance_tests.rs
|
|
|
|
- Added `annotation_projection_cost_distributions`
|
|
|
|
### crates/oa-desktop/src/source_annotations/tests.rs
|
|
|
|
- Added `empty_source_has_real_zero_width_marker`
|
|
- Added `exact_path_and_utf8_range_admission_keep_valid_neighbor`
|
|
- Added `half_open_next_line_excluded_separator_only_and_empty_line_anchored`
|
|
- Added `mixed_endings_use_actual_paragraphs_and_preserve_eof`
|
|
|
|
### crates/oa-desktop/src/source_annotations/widget/tests.rs
|
|
|
|
- Added `actual_word_and_line_selection_then_typing_survive_hover_and_publication_changes`
|
|
- Added `deferred_paragraph_renderer_rejects_the_old_local_lifetime`
|
|
- Added `deferred_tooltip_text_survives_draw_and_only_current_authority_is_retained`
|
|
- Added `disabled_hover_and_unavailable_cursor_hide_details_without_removing_current_marks`
|
|
- Added `measured_footer_and_omitted_count_fit_actual_shaped_widths_and_ancestor_clip`
|
|
- Added `pointer_motion_between_bands_blank_and_leave_is_passive_and_always_redraws`
|
|
- Added `stationary_pointer_replacement_absence_and_path_switch_use_only_current_index`
|
|
|
|
### crates/oa-desktop/src/views.rs
|
|
|
|
- Removed `source_header_keeps_editor_bounds_stable_through_lint_and_find_rebuilds`
|
|
- Removed `source_header_remains_scrollable_and_preserves_offset_across_diagnostic_refresh`
|
|
|
|
### crates/oa-desktop/src/views/source_symbols.rs
|
|
|
|
- Added `suffixes_distinguish_nested_duplicate_basenames_without_changing_unicode`
|
|
|
|
### crates/oa-desktop/src/views/text_workspace.rs
|
|
|
|
- Added `drawer_clamps_to_actual_center_allocation_including_oversize_requests`
|
|
- Added `five_slots_keep_editor_state_and_selection_through_explicit_and_passive_changes`
|
|
- Added `highlighted_sensor_editor_retains_real_scrolled_buffer_across_panel_rebuilds`
|
|
- Added `keyboard_resize_uses_effective_height_and_only_exact_open_drawer_shortcut`
|
|
|
|
### crates/oa-desktop/src/views/text_workspace/summary_visibility_tests.rs
|
|
|
|
- Added `all_reference_exceptions_fit_allocated_width_with_wide_alias_and_large_counts`
|