Draft
Conversation
…cking-in-patterns
…import scratch accept txt files
Reset file input value after import completes to allow the same file to be selected and imported multiple times. Without this, the browser's file input won't fire the change event when selecting the same file again. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…cking-in-patterns
CLI implementation (src/CLI/): - Rust-style error formatting with source context, line numbers, carets - evaluate_with_probe_map for probe sample collection - All commands working: run, format, analyze, probe (with --many) Documentation (plans/hazel-lsp-cli/): - cli-api.md: Complete CLI reference with examples - hazel-primer.md: Comprehensive Hazel syntax guide - hazel-builtins.md: Full builtin list with OCaml/ReasonML differences - vision.md: Long-term direction (semantic views, structural queries) - experience-log.md: AI experience tracking workflow - README.md: Project plan with status tracking Sample programs (hazel-programs/): - 9 documentation programs extracted from ML slides - 39 B2T2 programs extracted from ML slides - Folder structure for study tasks and examples Utilities (scripts/): - extract-docs.py: Extract .hz programs from ML backup_text fields 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
CLI test command (src/CLI/): - ./hazel test runs tests and reports pass/fail with line numbers - Shows hint strings for named tests (hint "name" test ... end) - Supports --verbose flag to show all tests - Exit code 0 = pass, 124 = failures Study program infrastructure (plans/study-programs.md): - Requirements for probe debugging user study programs - Development process and bug design guidelines - Tiered list of program concepts ready for parallel implementation - Probe mechanism overview from codebase research Example programs: - emojipaint.hz: Working version with comprehensive tests - emojipaint-bug.hz: Buggy version with single failing test - Proper indentation applied to both Documentation updates: - cli-api.md: Full test command documentation - hazel-primer.md: Named tests, debugging workflow with probes - README.md: Updated status and TODOs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Three new programs for probe debugging user studies: Tic-Tac-Toe (~265 lines, 18 tests): - 3x3 board with win/draw detection - Bug variants: wrong diagonal indices, turn not alternating Game of Life (~230 lines, 20 tests): - Cellular automaton with birth/death rules - Bug variants: missing diagonal neighbors (easy), wrong survival threshold (medium), sequential instead of simultaneous update (hard) Calculator (~270 lines, 28 tests): - Expression parser with operator precedence - Tokenizer, recursive descent parser, evaluator - Bug variants: flat precedence, right-associativity Documentation updates: - hazel-primer.md: Added note about comment syntax - experience-log.md: Documented eval reserved name and comment gotchas - Each program folder has detailed README with bug descriptions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## probe-III #2056 +/- ##
============================================
Coverage ? 50.83%
============================================
Files ? 220
Lines ? 25378
Branches ? 0
============================================
Hits ? 12900
Misses ? 12478
Partials ? 0
🚀 New features to boost your workflow:
|
Tooltip now distinguishes direct call sites from internal calls that jump to the enclosing user-visible call site. Fix pointer cursor and green focused highlight for anonymous/unknown breadcrumb entries. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Step-into only works for user-defined named functions, so hide it from the sample context menu for built-ins, anonymous functions, and constructors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a "Clear all" button on the far right of the closure cursor bar that removes all probes (manual and ephemeral) and resets the sample cursor. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ard toggle Replace flat text output with per-entry divs showing sequence number (left), value (center, word-wrapping), and source line number (right). Replace bespoke eval mode buttons with standard Widgets.toggle_named. Enable text selection in print panel. Remove unused eval-mode-button CSS. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The label name is already visible in source code, so probing the whole TupLabel (e.g. `brush = "a"`) is redundant. Now TupLabel is rejected like Parens, falling through to the value expression on the RHS. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When stepping into a function call, ensure a manual probe exists on the application expression being jumped from. This preserves the probe even when auto probes would otherwise be removed (e.g. cursor movement in auto-auto mode). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
maybe_rm_pin now checks has_probe before clearing a pin: if the expression still has any probe (manual or ephemeral), the pin is kept. Fixes pin loss during auto-auto def switches after step-into, where the manual probe on the source expression should anchor the pin. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Ephemerals are derived from autos.ids and get rebuilt automatically by add_ids_from_auto_term on the next editor calculate cycle. Clearing autos.ids ensures auto probes are actually removed; previously only ephemerals were cleared and auto probes would immediately reappear. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
In single mode, off-cursor samples aren't displayed (replaced by the not-aligned indicator). The legend now reflects this by showing the ⊖ icon instead of a rendered sample, with a tooltip explaining samples aren't shown and can be clicked to align. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rename domain-specific state types to `Model` for consistency across all MVU-style debugging tasks: Ledger→Model (harvest-streak), Greenhouse→Model (lunar-growth), Plot→Model (nutrient-rotation). Also rename init values to initModel. Regenerate slides. Add debugging-task-procedure.md with milestone scaffolding system for the probes user study. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When add_ids_from_auto_term detects genuinely new ephemeral IDs (not present in the previous ephemeral map), set pending_probe_cursor so the sample cursor aligns when evaluation results arrive. This ensures new code written in auto-def mode gets dynamic feedback without requiring manual cursor alignment. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Standardize on display-character width (ellipsis … = 1 char, not 3 bytes) - Add budget guards at top of abbreviate_exp/pat/typ/tpat - Compute per-item min_display_cost in AbbrevSequence to prevent over-optimistic item counts (strings need min 3: quote+…+quote) - Deduct string quote overhead before content abbreviation - Make TupLabel space unconditional in AutoFormat mode (ExpToSegment) - Fix drag handler: search for budget fitting target width instead of using raw column as budget; fix length==12 sentinel override - Use Unicode.length for display measurement in ProbeProj.len_seg - Add monotonicity sweep tests for constructor apps and other forms Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Budget now acts as a hard display-width cap: rendered output never exceeds budget in Unicode characters (for budget >= 1). Previously budget was a soft hint that forms could overshoot. Key changes: - Safety net with retry: if a form overshoots, retry at budget-1 via with_budget, preserving monotonicity - Min-cost guards on all expression forms (Parens=3, ListLit=3, Tuple=3, ConstructorAp=4, TupLabel=7, etc.) - Correct cost accounting: BinOp spaces, UnOp space, AbbrevSequence separator before trailing ellipsis - Budget-aware abbreviate_label_str with backtick quoting overhead - Same safety net pattern for abbreviate_pat and abbreviate_typ Drag interaction: - Read actual font metrics from #font-specimen DOM element instead of hardcoded col_width=10.0 - Binary search upward for the largest budget whose output fits within cursor position, compensating for budget distribution waste - Removed debug logging ([SWEEP], [DRAG]) Tests: 49 Abbreviate tests (monotonicity + hard cap + structural), 332 Evaluator tests all pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Abbreviated labels containing "…" were backtick-quoted by ExpToSegment (`al…` = 3 extra chars), making budget accounting complex and wasteful. Now truncated labels use Invalid instead of Label, which renders without quoting. Full (untruncated) labels remain as Label. TupLabel min cost drops from 7 to 5. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ations, and tiered fallback - Greedy left-to-right budget distribution: first item gets surplus after reserving minimums for remaining items. Replaces even split. - Count annotations (plus N): when items are omitted, trailing indicator shows remaining count. Applied to both tuples and lists. - Remove double-parens deduction from Tuple handler: bare Tuple renders without parens (Parens wrapper handles those). Recovers 2 budget chars. - Two-tier fallback: when items cannot render structurally, try showing them as bare ellipses with count annotation before collapsing entirely. - Count annotation in collapsed form: intermediates between bare ellipsis and first structural item. - Useful threshold = min (was 2x min): items shown when they can render at least their minimum structural form. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When all items in a tuple are TupLabels (records), distribute budget evenly so field names become visible simultaneously rather than greedily left-to-right. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove the Steps sample_base variant (Calls/StepRange toggle only). Route all mutable state changes through the action/update cycle, eliminating NoOp and direct Settings.go calls from view code. Extract font_metrics to JsUtil, dedup env filtering, break up sample_call_display, extract find_best_budget, simplify length_cls. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add probe_ctx record (ap_id, statics, settings, dynamics, utility, parent) to bundle shared args across ~20 view functions - Move statics into ctx (non-option), compute hide_env inside sample_view - Extract cursor_clss to take explicit args instead of full ctx - Remove dead code: click_coords, syntax_str, icon - Simplify length logic in value_view, deduplicate ap_id computation - Rename di -> dynamics throughout - Remove Steps mode and is_before_cursor field from Sample - Simplify ProbeSidebar legend: build div chain directly using cursor_clss instead of constructing fake ctx/dynamics for sample_view - Remove unused font_metrics param from legend_view - Clean up ProbeSidebar: remove dead code, simplify toggle logic Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Filter auto probes from sidebar (only show manual probes) - Extract pin_action/step_into_action helpers from sample_context_actions - Extract empty_view for the no-dynamics case - Move view_seg_line wrapping from M.view into offside_view - Unwrap cur_var_ap from option (statics always available) - Remove dead abbreviate function and stale comments Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a probe is inside a function body but not on a call site, there was no way to restrict samples to a single invocation. Add focus_call which uses the sample call_stack directly as the pinned_stack (vs pin_call which prepends the ap_id). Available via context menu (Pin enclosing call), meta-click, or p key. Existing pin on application probes renamed to Pin this call. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
No description provided.