Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
4db164c
refactor: clean up manifest models and remove numeric suffix logic
PaulHax Jul 19, 2025
e3fdac6
refactor(state): add updateParameters
PaulHax Jul 19, 2025
e890edb
refactor: change experiment key separator from underscore to colon
PaulHax Jul 19, 2025
424eca7
wip
PaulHax Jul 19, 2025
a0ee8a9
working on init
PaulHax Jul 21, 2025
fc05c59
fixed updateAppParameters
PaulHax Jul 21, 2025
2a3bda1
renaming baseScnario to scene
PaulHax Jul 21, 2025
8869224
loading first run
PaulHax Jul 21, 2025
982ce80
fixed scenario select
PaulHax Jul 21, 2025
b3d3998
KDMAs load
PaulHax Jul 21, 2025
9c23737
fix input output json and timing showing
PaulHax Jul 21, 2025
d5ccc39
refactor: simplify UI handlers to use updatePinnedRunState system
PaulHax Jul 21, 2025
faacc37
refactor: extract common KDMA utilities to eliminate code duplication
PaulHax Jul 21, 2025
cda2482
refactor: eliminate global appState selections and improve column cre…
PaulHax Jul 21, 2025
d17a5de
refactor: remove unused code and current run concept
PaulHax Jul 21, 2025
98e9e3c
fix: resolve URL state initialization issues for pinned runs
PaulHax Jul 21, 2025
4611f0f
fix: correct source index usage for mixed KDMA experiments
PaulHax Jul 21, 2025
3ef0e90
fix: enable KDMA delete buttons when valid combinations exist
PaulHax Jul 21, 2025
7f8b972
refactor: simplify KDMA validation by removing unused legacy functions
PaulHax Jul 21, 2025
ab187b7
fix: improve Add KDMA button logic to check valid combinations
PaulHax Jul 21, 2025
83e510b
fix: restrict KDMA sliders to valid values using HTML5 constraints
PaulHax Jul 21, 2025
edaf54b
refactor: remove unused code
PaulHax Jul 22, 2025
6d87940
refactor: remove typeof object checks and fix null LLM handling
PaulHax Jul 22, 2025
0f65d44
fix: repair run variant dropdown using existing parameter system
PaulHax Jul 22, 2025
476eb34
refactor: remove debug console.log statements from state.js
PaulHax Jul 22, 2025
ff6ff9e
refactor: remove dead code and extract shared logic in app.js
PaulHax Jul 22, 2025
06b400b
refactor: simplify run variant dropdown to use generic dropdown function
PaulHax Jul 22, 2025
bd32f1c
refactor: simplify dropdown logic - always disable with few options
PaulHax Jul 22, 2025
dd73fea
refactor: always sort dropdown options for consistent UX
PaulHax Jul 22, 2025
4d8c3d2
cleanup: remove debug console.log statements
PaulHax Jul 22, 2025
2822daf
fix: show only valid KDMA types in dropdown selection
PaulHax Jul 22, 2025
cf0039d
refactor: comprehensive JavaScript cleanup and test improvements
PaulHax Jul 22, 2025
a9f5261
feat: add multi-KDMA support for experiment parsing and frontend
PaulHax Jul 22, 2025
ff68419
cleanup: remove unnecessary special KDMA handling and debug code
PaulHax Jul 22, 2025
2c3fddd
feat: add URL parameter validation against manifest creation date
PaulHax Jul 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Each experiment directory must contain:

- `.hydra/config.yaml` - Hydra configuration file
- `input_output.json` - Experiment input/output data
- `scores.json` - Scoring results
- `timing.json` - Timing information

**Example Structure:**
Expand All @@ -49,22 +48,24 @@ experiments/
│ ├── affiliation-0.0/
│ │ ├── .hydra/config.yaml
│ │ ├── input_output.json
│ │ ├── scores.json
│ │ ├── scores.json # optional
│ │ └── timing.json
│ ├── affiliation-0.1/
│ │ └── ...
│ └── ...
├── pipeline_random/
│ └── ...
└── pipeline_other/
│ └── affiliation-0.1/
│ └── ...
├── deeply/nested/structure/
│ └── experiment_dir/
│ ├── .hydra/config.yaml
│ ├── input_output.json
│ └── timing.json
└── any_organization_works/
└── ...
```

#### Automatic Filtering

The build system will automatically:

- **Recursively search** through all subdirectories
- **Recursively search** through all subdirectories at any depth
- **Skip directories** containing `OUTDATED` in their path (case-insensitive)
- **Only process directories** that contain all required files

Expand Down
12 changes: 2 additions & 10 deletions align_browser/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,10 @@ def build_frontend(
data_output_dir.mkdir(exist_ok=True)

# Parse experiments and build manifest
experiments = parse_experiments_directory(experiments_root, data_output_dir)
experiments = parse_experiments_directory(experiments_root)
manifest = build_manifest_from_experiments(experiments, experiments_root)

# Add generation timestamp (deterministic for tests)
import os

if os.getenv("PYTEST_CURRENT_TEST"):
# Use deterministic timestamp during tests
manifest.metadata["generated_at"] = "2024-01-01T00:00:00"
else:
# Use actual timestamp in production
manifest.metadata["generated_at"] = datetime.now().isoformat()
manifest.generated_at = datetime.now().isoformat()

# Copy experiment data files
copy_experiment_files(experiments, experiments_root, data_output_dir)
Expand Down
28 changes: 28 additions & 0 deletions align_browser/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,34 @@ def ensure_kdma_slider_value(page, selector, value):
return False


def ensure_dropdown_selection(page, selector, required_value, description="dropdown"):
"""
Ensures a dropdown has the required value selected.
Fails if the required value cannot be ensured (either by selection or auto-selection).

Args:
page: Playwright page object
selector: CSS selector for the select element
required_value: The required value that must be selected
description: Human-readable description for error messages

Raises:
AssertionError: If the required value cannot be ensured
"""
dropdown = page.locator(selector).first

if dropdown.is_enabled():
# Dropdown is enabled - try to select the required value
dropdown.select_option(required_value)
page.wait_for_load_state("networkidle")

# Verify the required value is now selected (whether we selected it or it was auto-selected)
current_value = dropdown.input_value()
assert current_value == required_value, (
f"{description} dropdown must have '{required_value}' selected, but has '{current_value}'"
)


class FrontendTestServer:
"""HTTP server for serving the built frontend during tests."""

Expand Down
Loading
Loading