Skip to content

Conversation

@7h3kk1d
Copy link
Contributor

@7h3kk1d 7h3kk1d commented Nov 3, 2025

Adds a rich "projector-style" display on probed values. Also allows for the underlying syntax to be rewritten by the probed interface. Currently there's a calculator for integers, table editor, and card view.

Calculator

Screencast.From.2025-11-21.11-12-44.webm

Tables

The rich table probe allows for some column actions to rewrite the underlying syntax via function pipelining. If placed on a pattern the table is read-only
Screencast From 2025-11-21 11-16-20.webm

7h3kk1d and others added 30 commits May 30, 2025 10:10
- Introduced DataFrame projector implementation with necessary functions.
- Updated ProjectorCore to include DataFrame as a projector kind.
- Added DataFrame styling in CSS for better presentation in the editor.
- Defined new CSS variables for DataFrame table aesthetics.
- Modify `add_ids_from_auto_term` to update ephemerals map without overwriting existing entries
- Add ephemeral refractor support in `SetSyntax` action, allowing projection and selection replacement
- Simplify refractor model updates and remove debug print statements
- Add `get_ephemerals` utility function to `ZipperBase` for accessing ephemeral refractors
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a rich "projector-style" display system for probed values, introducing three interactive renderers (calculator for integers, table editor for structured data, and card view for playing cards). The system allows users to view and manipulate probed values through modal interfaces that can rewrite the underlying syntax.

Key Changes:

  • Added new renderer system with RichProbe interface for domain-specific visualizations
  • Implemented three renderers: TableRenderer, CalculatorRenderer, and CardRenderer
  • Added project_tables setting to control table projection in evaluation output
  • Extended projector system to support dynamic renderer selection and syntax rewriting

Reviewed Changes

Copilot reviewed 52 out of 52 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/web/app/common/foo Test data file (987 lines) - should not be committed
test/haz3ltest.re Commented out 3 test suites without explanation
src/haz3lcore/projectors/implementations/TableRenderer.re New table renderer with column operations (817 lines)
src/haz3lcore/projectors/implementations/CalculatorRenderer.re New calculator renderer for integer arithmetic (258 lines)
src/haz3lcore/projectors/implementations/CardRenderer.re New card visualization renderer (326 lines)
src/haz3lcore/projectors/implementations/RichProbe.re New interface for rich probe renderers (47 lines)
src/haz3lcore/projectors/implementations/ProbeProj.re Extended probe projector with renderer registry and modal support
src/haz3lcore/projectors/ProjectorPerform.re Updated action handling to preserve refractor models during syntax updates
src/haz3lcore/pretty/ExpToSegment.re Added table projection support in expression pretty-printing
src/language/CoreSettings.re Added project_tables setting to evaluation configuration
src/web/Settings.re Integrated project_tables toggle in settings UI
CSS files Added styling for calculator, table, and tableprobe projectors

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

The print_segment parameter, used for debugging, was removed from various
action performer functions like Editor.Update.update, ProjectorPerform.go,
Perform.go, and related calls in CodeEditable.re and Test_Editing.re.
This cleanup simplifies function signatures and eliminates debug-only code.
- Updated term_to_seg and lift_syntax in ProjectorBase.utility to accept ~inline bool
- Modified ProjectorInfo to thread ~inline through ExpToSegment settings
- Hardcoded ~inline=true in implementations (Calculator, Card, Checkbox, etc.) to enable inline behavior
- Implements previously TODO to avoid hardcoding and thread inline option properly for consistent projection rendering.
@@ -1,3 +1,4 @@
[@coverage exclude_file];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason coverage breaks the regex in here. We should open an issue in the bisect_ppx repo

Refactor CalculatorRenderer to use Bigint.t instead of int for operands and values, enabling support for larger numbers and preventing overflow in arithmetic operations. Updated type definitions, parsing, display, and digit button logic accordingly.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 53 out of 53 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants