# Plan 1: Structured Queue Info & UI Selectors

## Objective
Improve the visualization of `queue_info` in the Edge Explorer and use that data to improve the user experience when submitting PsiJ jobs by providing pull-down selectors for Queues and Accounts.

## Implementation Steps

### 1. Update Explorer UI for Queue Info
- **File**: `examples/edge_explorer.html`
- **Action**: Refactor `renderQueueInfo` to handle the dictionary format returned by `QueueInfoSlurm` (it returns `{"queues": {...}}`).
- **Action**: Enhance the `queueinfo-content` area to show separate sections for:
    - **Partitions**: A table showing name, state, node counts, CPU counts, and time limits.
    - **Allocations**: A table showing accounts and users associated with the current environment.
    - **Jobs**: Keep the "View Jobs" functionality but ensure it renders cleanly within this structured view.

### 2. Global State for Queue Data
- **File**: `examples/edge_explorer.html`
- **Action**: Add a global `queueDataCache = {}` to store the results of `queue_info` fetches per edge.
- **Action**: Update `autoLoadQueueInfo` to populate this cache.

### 3. Dynamic Selectors in PsiJ Page
- **File**: `examples/edge_explorer.html`
- **Action**: In `showPluginPage('psij')`, check if `queueDataCache[edgeName]` exists.
- **Action**: If exists, replace the `p-queue` and `p-account` inputs with `<select>` elements.
- **Action**: Populate the selectors with names from `queues` and `accounts` in the cache.

## Test Plan
1. **Manual Verification**:
    - Connect to an edge via the bridge.
    - Open the `Queue Info` page for the edge.
    - Verify that partitions and allocations are displayed in categorized tables.
    - Navigate to the `PsiJ Jobs` page.
    - Confirm that the "Queue" and "Account" fields have become pull-down menus containing the correct values from the previous step.
2. **Regression**: Ensure that if `queue_info` is *not* fetched yet, the PsiJ fields remain as standard text inputs or show a "Load Queue Info to see options" hint.
