-
Notifications
You must be signed in to change notification settings - Fork 61
Probes II #1879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Probes II #1879
Conversation
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
…ss, old DHCode css
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## dev #1879 +/- ##
==========================================
- Coverage 49.83% 47.83% -2.00%
==========================================
Files 218 229 +11
Lines 23103 24815 +1712
==========================================
+ Hits 11513 11871 +358
- Misses 11590 12944 +1354
🚀 New features to boost your workflow:
|
cyrus-
requested changes
Jan 14, 2026
Member
cyrus-
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most critical:
- clicking the "..." next to a sample toggles you to an arbitrary (?) sample
- cursor frankenstein state (focus isn't kept in sync with browser notion of focus)
- step into causes frankenstein state
other stuff (triage):
- Context menu should say "add/remove projector"
- On bottom right of chrome, have it be an indicator of whether there are any errors/warnings/holes remaining
- "Ad probe" typo in comments on doc slide for probe
- Do general consistency pass for comments
- Disable debug popup which causes a focus issue
- allow both "P" and "Shift-P" for pinning
- hide the "P" and "Enter" keyboard shortcut indicators when not focused
- double click the sample to toggle back to single sample mode
- remove Opt/Alt-V shortcut in favor of Cmd/Ctrl-E (and change text in doc slides)
- style for probe counts when there is an error on the probed term and not focused
- can still have two probes on the same line if it happens via an edit (e.g. backspace)
- include icon for samples not aligned with cursor in legend in many mode
- consistency of naming of "cursor" -> should be "dynamic cursor" whenever possible
- move Dynamic Cursor box in probearium to top or some other way to make clear that the legend reference to "Cursor" is the dynamic cursor
- think about being able to toggle off probes on a sub-expression when it is inside an autoprobe (lifetime as long as the autoprobe lives)
- step into doesn't work for function literals in function position
- be able to bulk probe via selection using same logic as auto probing
- when probes show up there appears to be some sort of animation/shimmer maybe involving the depth indicators?
- Remove Alt-V/Option-V keyboard shortcuts from Keyboard.re and ProbeProj.re - Update Shortcut.re to reflect Cmd/Ctrl-E as the probe hotkey - Rename cur_ap to cur_var_ap to clarify it only matches variable applications - Change context menu "Project" to "Add" for consistency - Add double-click on sample value to toggle settings window - Simplify sample context menu CSS selectors 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Status indicator: - Add error_ids field to cursor type for global statics summary - Replace decorative corner element with status indicator showing: - Green circle + checkmark when no errors - Red circle + error count when errors present - Font size scales for 1/2/3+ digit counts Probe polish: - Hide refractor overlays when editor not selected - Simplify ellipsis_view (double-click only, remove pointer handler) - Comment out error-state red styling for probe num-samples - Comment out Pat-specific nav-arrow color filter - Update Probes.ml documentation (terminology: "cells" → "samples") 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Extend FocusEffect to support Editor focus (via clipboard_shim) in addition to Probe focus, schedule editor focus after step-into - Disable pending_focus mechanism which wasn't working correctly (was attempting to focus matching sample in target probe) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
When text reflow causes multiple probes to end up on the same line, automatically remove all but the rightmost probe. This runs in the calculate phase after measurements are fresh. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Change TypeProj from Info projector to Statics refractor kind - Add double-click toggle between Expected/Self type display modes - Implement smart context menu labels that show Add/Remove/Switch based on current refractor state - Fix toggle_manual and toggle_statics to properly switch between refractors instead of just removing - Consolidate SetModel action to handle both projectors and refractors using kind discrimination - Add Alt+T keyboard shortcut for statics refractor - Rename CSS classes: probe-indicated → refractor-indicated, indication-probed → indication-refractored - Add purple color styling for statics refractor (dashed lines and backing) - Add kind classes to refractor SVG paths for per-kind styling - Refactor ContextMenu.re to eliminate duplication between probes_actions and view function - Move is_refractor_trigger and of_refractor_trigger functions from ProjectorCore to Triggers - Remove old Info projector kind from codebase 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Member
Author
The visibility filter was only checking the origin row, causing large projectors (like the 196-line B2T2 Datasheet) to disappear when their first line scrolled out of view. Now checks if any part of the projector overlaps with the visible viewport range using both origin and last rows. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- Menu now opens up/down/left/right based on available viewport space - Calculates available space relative to #main viewport - CSS transforms handle menu positioning for each direction - Click-outside closes menu via backdrop element - Wheel events close menu to prevent stale positioning - Precise caret alignment using shadow offset from ShardDec 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add JsUtil.ContextMenuListener module for document-level click handling - Uses capture phase for single-click UX (click closes menu AND activates target) - Uses Bonsai.Effect.Expert.handle to dispatch effects from outside virtual-dom - Includes ancestor check to avoid closing when clicking inside menu - Add window blur listener to close menu when switching applications - Add direction-aware open animations (0.12s fade+scale from anchor point) - Update plan document with implementation notes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Move ContextMenuListener from JsUtil.re to dedicated ContextMenuListener.re - Add 50ms debounce window to prevent menu from immediately closing/reopening when right-click that opens menu also triggers document listener - Remove backdrop's pointerdown handler (redundant with document listener) - Keep backdrop only for wheel/scroll close behavior 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
ToggleContextMenu was using Updated.return which defaults is_edit=true, causing autosave on every context menu open/close. Changed to return_quiet since this is a UI state change, not an edit. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Implement full keyboard navigation for the context menu: - Arrow keys navigate between items (including across dividers) - Enter activates the selected item - Escape closes the menu - Shift+F10 opens the menu (VS Code convention) Changed context_menu state from bool to option(int) to track which item is selected for keyboard navigation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Extract context_menu_action type and update logic into a new ContextMenu.State module, making ContextMenu.re the single source of truth for context menu behavior. CodeEditable.re now delegates to ContextMenu.State.update for state transitions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Refactor to make adding menu items straightforward: 1. Create a *_data function returning list(menu_item_data) 2. Add it to the appropriate section in get_sections Changes: - Add get_sections as single source of truth for menu structure - Derive get_all_items from get_sections (was duplicated logic) - Simplify view to use fold with automatic index tracking - Remove redundant legacy view functions (manual_probe, auto_probe, type_annotation, jump_to_binding, refractor_actions, Projectors.actions) Net reduction of 68 lines. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add Cmd+. (Mac) / Ctrl+. (PC) to open context menu (VS Code Quick Fix) - Rename ContextMenu.State module to ContextMenu.Model - Remove unused legacy menu_item function - Pass ci to refractor_actions_data to avoid duplicate computation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add "Introduce" action to context menu with type-based visibility predicates (only shows when expected type is introducible) - Add "Select term" action to context menu - Fix Shortcut.re hotkey literal string bug (was "Keyboard.meta(sys)+e") - Fix "Toggle Toggle Dynamics" typo in Shortcut.re - Add can_introduce_exp_type/can_introduce_pat_type predicates to Introduce.re for centralized type checking - Update context menu plan with Phase 5 and Phase 7 documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add ContextMenu.WithContext module with update and handle_key functions - Move clamping logic from CodeEditable to WithContext.update - Move keyboard navigation logic from CodeEditable to WithContext.handle_key - Fix arrow key navigation bug (index now properly clamped) - CodeEditable now delegates to WithContext, keeping it as a thin orchestrator This consolidates context-menu-specific logic in ContextMenu.re while making the required editor context (info_map, zipper) explicit in the function signatures. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- When projecting a term with a refractor, migrate the refractor to the projector's ID so it stays visible - When removing/switching projectors, migrate refractors back appropriately - Fix context menu to show "Switch to X" instead of "Add X" when a different projector is already present 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
The context menu was showing "Remove probe" instead of "Remove statics" when clicking on a function literal with statics. The issue was that has_statics checked only the indicated term's ID, but for function literals, refractors are stored on sub-terms (pattern and body) via target_subterm_ids. Added has_statics helper to ProbePerform that correctly uses target_subterm_ids, matching how probe_status works. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add Statics variant to probe_status type, rename REPL to Auto - Simplify context menu label logic by encoding statics in the type - Add Info.is_typable_term predicate to centralize "can this term have a type/value" logic (expressions and patterns, excluding deferrals, labels, type aliases, types, and type patterns) - Replace duplicated logic in can_statics, candidate_allowed_by_term_sort, and target_subterm_ids with calls to is_typable_term 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add maybe_reset_cursor to clear stale dynamic cursor state from the sidebar when all probes are removed. Consolidate probe post-calculation effects (collision cleanup, auto-probe regeneration, focus resolution, cursor reset) into ProbePerform.editor_effects called from Editor.calculate. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Two related fixes for multi-tile forms (case expressions, list literals): 1. MakeTerm: Preserve root_piece in consolidate_adopted - consolidate_adopted was overwriting the entire term_data entry - This broke Arms.tiles_data which uses root_tile to find shards - Now preserves original root_piece while updating skel/sort/base_seg 2. AutoProbe: Normalize selected IDs to rep_ids - AutoProbe could return non-rep tile IDs (e.g., rule tile for case) - Evaluator stores samples keyed by rep_id (case,end tile) - Mismatch caused sample lookup to fail for single-line case exprs - Now normalizes all selected IDs via Any.rep_id before returning Added test cases for case expression probe placement. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
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.
Core features:
Core internals:
Non-probe Bug fixes:
Non-probe supporting features:
Context menu:
Adding/remove probes:
Sample display:
Internals:
StepInto:
Pinning:
Autoprobes:
(a, b)then we've seen and can tell the bindings a and b). UPDATE: This actually results in confusing omissions; disabled; was annoying when e.g. the ref is a branch of an a if expression(a, // show value of a here [linebreak] b) // show value of b here, NOT the value of (a,b)Sidebar:
Review:
Done:
Bugs: