The paren depth counter started at 0 and immediately matched before
any '(' was counted, causing param blocks to be detected as ending
on line 0. Added foundOpen flag to require at least one '(' before
checking for balanced depth.
For cursor alignment: switch both textarea and overlay to whitespace-pre
with wrap=off, use explicit 21px line-height (14px * 1.5), and strip
all default pre element margins/padding/borders.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The highlighted overlay had double padding (wrapper p-4 + pre p-4) and
its own bg-card background, causing the visible text to drift from the
actual cursor position. Fix: strip pre padding/background in overlay
mode via className prop, add explicit line-height and whitespace-pre-wrap
to both layers so they wrap identically character-for-character.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Switch from single multiline regex to line-by-line scanning that skips
PowerShell attribute decorators like [Parameter(Mandatory=$true)] and
[ValidateSet(...)]. This correctly detects parameters with attribute
lines above them (the most common real-world pattern).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Stepper now auto-dismisses when the user edits the script body during
detection, preventing stale matchedLine replacements. Function-level
param() block detection uses brace depth counting instead of simple
equality check, correctly handling nested braces in function bodies.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds Detect Parameters button, stepper integration, and handlers
for accepting/skipping candidates with script body placeholder
replacement.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Instead of an empty gap between header and Generate button, display
a small info box explaining no parameters are needed.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add 'Back to Script Library' link at top of ScriptTemplateListView.
Change right pane in ScriptLibraryPage from overflow-hidden to
overflow-y-auto so the script preview scrolls for long scripts.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ScriptBodyEditor: overlay now has overflow-hidden and syncs scroll
position from the textarea via onScroll, so only one scrollbar appears.
ScriptManagePage: outer scroll container is now full-width so scrolling
works even when hovering outside the max-w content area.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace pulsing dot with a light cyan background pill that's visible
but not distracting. Remove overflow-hidden from ScriptBodyEditor
wrapper so the textarea content scrolls properly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add pulsing cyan dot + hover gear rotation to make the link noticeable.
Add overflow-y-auto to ScriptManagePage so the editor form scrolls.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The chunk-reload logic used Date.now() and sessionStorage during render,
triggering react-hooks/purity. Moved to useEffect so side effects run
after commit, fixing the CI lint failure.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove leftover text-left on TemplateCard div (was from button era)
- Use warning text as React key instead of array index
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The right pane is now ScriptPreview-only. Generate/Download/Copy controls
moved to ScriptConfigurePane in the left pane (configure mode).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add paneMode state ('browse' | 'configure') local to page
- Move ScriptFilterBar inside left pane column (hidden in configure mode)
- inputValue owned at page level to survive mode transitions
- Left pane: ScriptFilterBar + ScriptTemplateList in browse; ScriptConfigurePane in configure
- Right pane: ScriptPreview only (read-only); empty state when no template selected
- canGenerate derived from usePermissions().isEngineer (matching ScriptGeneratorPanel pattern)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- ScriptParameterField: extract error <p> from select/boolean input blocks and remove error prop from Input/Textarea components so all types render help_text before error via unified bottom rendering
- ScriptFilterBar: replace native <input> with shared <Input> component from @/components/ui/Input, preserving search icon via absolute positioning wrapper
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>