Conversation
Allow users to point directly at a single experiment directory instead of requiring a parent directory containing experiments. The parser now checks if the given path itself is a valid experiment directory before recursively searching subdirectories. This enables usage like: uv run align-browser --dev ./experiment-data/icl_test/pipeline_comp_reg_icl_test/
Add comprehensive choice_info display functionality with: - Expandable sections for each top-level key with summary and details - Special handling for predicted_kdma_values and icl_example_responses - Proper text processing for escaped characters in ICL prompts - Unique section IDs per run column to prevent cross-column interference - Positioned after justification row for logical grouping - Generic fallback for unknown choice_info structures
Move all table formatting functions from app.js to table-formatter.js to create clear separation between business logic and presentation logic. This consolidation reduces app.js from 1500+ lines and creates a comprehensive formatting module. Key changes: - Move choice/KDMA formatting functions to table-formatter.js - Move dropdown generation and KDMA control creation functions - Move core value formatting and comparison utilities - Update function signatures to properly pass dependencies (pinnedRuns, KDMAUtils) - Fix JavaScript initialization order to prevent "Cannot access before initialization" errors - Clean up duplicate code and unused imports All 51 tests pass, confirming functionality is preserved while improving code organization and maintainability.
Replace awkward parameter passing of KDMAUtils with direct import from state.js. This simplifies function signatures and makes the code more maintainable by removing the need to thread KDMAUtils through multiple function calls. All tests continue to pass, confirming the refactor preserves functionality.
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.
Add Choice Info Display and Consolidate Table Formatting Code
Summary
This PR adds a new "Choice Info" row to the experiment results table and consolidates all table formatting logic into a dedicated module for better code organization.
Key Features
🆕 Choice Info Display (commit 90b84fd)
choice_infosection from input/output JSON🔧 Code Architecture Improvements (commits 5b031c9, 16169e5)
table-formatter.jsmoduleTechnical Details
Choice Info Features:
white-space: pre-wrapCode Organization:
Testing
Files Changed
align_browser/static/index.html- Added choice_info table rowalign_browser/static/app.js- Reduced complexity, updated importsalign_browser/static/table-formatter.js- New comprehensive formatting modulealign_browser/static/style.css- Added choice_info stylingThis PR significantly improves both the user experience with rich choice_info display and developer experience with cleaner, more maintainable code architecture.