Commit Graph

280 Commits

Author SHA1 Message Date
Nick Shirokov 8b0664b18d fix(web-test): avoid confusing small EPF form with info dialog in openFile
Check form change before checkForErrors() to prevent misidentifying
a small EPF form (< 20 elements) as an informational modal dialog.
Only call checkForErrors() on suspiciously tiny new forms.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 14:19:24 +03:00
Nick Shirokov 2af73d25bf fix(web-test): handle follow-up info dialog after security confirmation in openFile
After clicking "Да" on the security confirmation, check for a second
informational modal ("please re-open the file"). If present, dismiss it
and retry the full Ctrl+O → filechooser cycle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 14:17:33 +03:00
Nick Shirokov 449e2f667e feat(web-test): add openFile() for opening external processors (EPF/ERF)
Opens EPF/ERF files via Ctrl+O → 1C file dialog → native file picker.
Handles security confirmation dialog with up to 2 attempts for re-open.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 14:11:43 +03:00
Nick Shirokov 09fc3a7f43 docs(v8-project): note that file is in .gitignore due to secrets
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 13:16:45 +03:00
Nick Shirokov 01315839fb docs: add .v8-project.json reference guide
Consolidate project config documentation into a single guide covering all
fields (v8path, databases, webPath, ffmpegPath, tts, webUrl), with "who fills"
column and resolution algorithm. Replace duplicated format sections in
db-guide.md and web-guide.md with links to the new guide.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 13:14:08 +03:00
Nick Shirokov 6505fb1986 docs(web-test): update TTS provider recommendations with ElevenLabs findings
Recommend professional voices with educational/business profile (Olga, Artem,
Denis) for ElevenLabs Russian content. Note articulation issues with
multilingual model on Russian terminology (stress, vowel quality).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 12:55:12 +03:00
Nick Shirokov 9e022c60f9 docs(web-test): add TTS provider recommendations to recording guide
Edge TTS recommended for Russian (better stress, intonation, semantic accents),
ElevenLabs for English/multilingual content (less robotic timbre).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 12:19:23 +03:00
Nick Shirokov e23a235ffa fix(web-test): limit ElevenLabs TTS concurrency to 2 and improve error logging
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 12:10:01 +03:00
Nick Shirokov 5bccca2475 feat(web-test): add ElevenLabs TTS provider
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 11:15:36 +03:00
Nick Shirokov a8d8007846 docs(web-test): update stopRecording return type in recording.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 11:00:03 +03:00
Nick Shirokov 37d2a5ee15 docs(web-test): add video recording guide for users
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 10:58:27 +03:00
Nick Shirokov 050d42a457 fix(web-test): use video-time timestamps for precise TTS sync
Caption timestamps now use actual video timeline position (frame
counter) instead of wall-clock time, eliminating sync drift from
non-uniform frame duplication in CDP screencast recordings.

Also replace silence-file concatenation with adelay+amix for
sample-accurate TTS placement, and fix exec timeout for long
scenarios (fetch → http.request with 10min timeout).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 10:13:32 +03:00
Nick Shirokov 5acb586bbf fix(web-test): fix audio-video sync drift in narration
Screencast frame duplication (Math.round) causes video to be ~5% longer
than wall-clock time. Caption timestamps are wall-clock based, so the
audio track drifted ahead by ~8s at the midpoint of a 5-minute video.

Fix:
- stopRecording() saves recordingDuration in captions.json
- addNarration() reads actual video duration via ffprobe and scales
  caption timestamps by videoDuration/recordingDuration ratio
- Phase 2 timeline now tracks actual cumulative position instead of
  computing gaps from previous caption data (prevents MP3 frame
  quantization drift)
- Also fixed findFfmpeg() → resolveFfmpeg() call in addNarration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 00:45:30 +03:00
Nick Shirokov 7f6ea32533 refactor(web-test): add resolveEdgeTts() with fallback chain
Mirrors resolveFfmpeg() pattern: tries global/project-level import
first, then tools/tts/node_modules/, then throws error with install
instructions. Caches resolved module for subsequent calls.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 00:03:16 +03:00
Nick Shirokov e9b53505ac fix(web-test): move TTS to tools/tts/, use atempo instead of trimming
- node-edge-tts installed in tools/tts/ (alongside tools/ffmpeg/)
- Speed up TTS with ffmpeg atempo when it exceeds gap to next caption,
  instead of hard-cutting the audio

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 23:46:50 +03:00
Nick Shirokov 6ce36f7d9b fix(web-test): resolve node-edge-tts from tools/node_modules
Dynamic import needs file:// URL on Windows and explicit entry point
for ESM resolution. Package installed in tools/ alongside ffmpeg.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 23:29:56 +03:00
Nick Shirokov a13f16e49d feat(web-test): add TTS narration for video recordings
showCaption() collects captions with optional speech parameter,
stopRecording() saves .captions.json, addNarration() generates
TTS voiceover (Edge TTS or OpenAI) and merges audio with video.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 23:10:37 +03:00
Nick Shirokov 8f130f2e83 docs: update project description in README
Reflect the full development cycle the project now covers: from XML
artifacts to database management, web publishing, browser testing,
and video recording.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 20:34:42 +03:00
Nick Shirokov 26ea09e2ff fix(web-test): correct video color range for H.264 players
JPEG full range (0-255) was tagged as pc/full in H.264 output, but most
players (VLC, etc.) expect limited range (16-235). Convert JPEG→limited
with scale filter and tag as tv. Also switch preset ultrafast→fast for
5-6x smaller files on static screen content.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 20:05:32 +03:00
Nick Shirokov 98c416b5a7 fix(web-test): highlight commands before form elements
When the function panel is open over a form, highlight() was finding
buttons from the hidden form instead of visible commands on the panel.
Move command search (cmd_XXX_txt) to step 1 — before form-scoped
search — so visible panel commands always take priority. Form elements
searched at step 2 only if no command matched.

Highlight search order is now:
0. Open submenu/popup (elementFromPoint overlay)
1. Commands on function panel (visible cmd_ elements)
2. Form elements (buttons, fields, grid rows)
3. Sections (sidebar navigation)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 19:14:26 +03:00
Nick Shirokov 98ece6206e fix(web-test): add startsWith matching to findClickTargetScript
The button/link search in findClickTargetScript jumped from exact
to includes matching, causing "Поступление" to match "Поступление
билетов" instead of "Поступление (акты, накладные, УПД)" when the
shorter name appeared first in DOM order. Add startsWith step for
both name and label between exact and includes matching.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 19:03:34 +03:00
Nick Shirokov 0c0a1aea49 docs: add Kiro to supported platforms in README
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 20:43:24 +03:00
Nikolay-Shirokov 5870fa200f Merge pull request #3 from JohnyDeath/main
Добавлена Kiro в switch.py
2026-03-01 20:38:17 +03:00
Nick Shirokov 7c10e5e4b1 fix(web-test): highlight submenu items and command startsWith matching
- Add submenu/popup as priority 0 in highlight() — checks open
  popups before form search, preventing false matches on grid rows
  behind the popup overlay
- Use elementFromPoint + direct overlay for submenu items instead
  of getElementById (1C duplicates IDs in cloud popups — hidden
  copy in form + visible copy in cloud)
- Add startsWith step between exact and includes for section and
  command matching — fixes "Поступление" matching "Поступление
  билетов" instead of "Поступление (акты, накладные, УПД)"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 18:06:20 +03:00
Nick Shirokov 665d5579d2 docs(web-test): add highlight API to recording docs and guides
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 15:06:12 +03:00
Nick Shirokov 0fec18bbc4 fix(web-test): unhighlight fillFields before Tab, not after
Move unhighlight() before the fill action in fillFields — prevents
our overlay staying visible while platform focus moves to next field
on Tab/Enter. Consistent with clickElement/selectValue pattern:
highlight → wait → unhighlight → action.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 14:34:06 +03:00
Nick Shirokov cc751a344e fix(web-test): fix highlight bugs — search priority, modal overlap, section/command support
- Reorder highlight() search: form elements first, sections/commands as
  fallback. Fixes false match where "ОК" matched section "Покупки" via
  substring .includes() ("пок" contains "ок")
- Unhighlight before action in clickElement/selectValue (was only in
  finally block, causing overlay to cover modals opened by the click)
- Add auto-highlight support to navigateSection and openCommand

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 14:26:49 +03:00
Nick Shirokov f956749e1e feat(web-test): add element highlighting for video recordings
Add highlight/unhighlight/setHighlight/isHighlightMode functions.
Overlay div tracks element position via requestAnimationFrame — follows
layout shifts from async banner loads. Search order: sections → commands
→ buttons/links → fields → grid rows. Auto-highlight mode integrates
with clickElement, fillFields, selectValue.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 13:47:29 +03:00
Nick Shirokov 2a6f4b1d5f fix(web-test): correct video brightness via color_range flag
JPEG frames from CDP screencast use full range (0-255) but H.264
defaults to limited range (16-235). Add -color_range pc to preserve
full range in output MP4, fixing washed-out/bright appearance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 12:32:39 +03:00
Nick Shirokov 9318d05535 docs(web-test): fix caption timing pattern in recording example
Show caption before action with wait() pause, not after.
Viewer reads what will happen, then sees it happen.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 12:25:33 +03:00
Nick Shirokov bb07bfae14 feat(web-test): add showTitleSlide/hideTitleSlide for video intros
Full-screen overlay with gradient background, centered title text,
optional subtitle. Useful for intro/outro frames in video recordings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 11:50:25 +03:00
Nick Shirokov 38c82f4a2f docs(web-test): update error handling and ё normalization notes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:34:55 +03:00
Nick Shirokov d5fa5349d4 fix(web-test): ё/е normalization, DLB intercept fix, throw on errors
Three improvements to browser automation reliability:

1. ё→е normalization: fuzzy matching now treats ё and е as equivalent
   across all comparison points in both dom.mjs (norm() functions,
   target variables) and browser.mjs (popup, radio, EDD, grid, confirmation
   dialog, advanced search, filter badges). Prevents silent failures when
   script uses ё but 1C displays е or vice versa.

2. DLB intercept handling in selectValue(): added force click + Escape
   fallback when funcPanel overlay blocks the dropdown button click,
   matching the pattern already used in clickElement().

3. Error handling: all exported functions now throw Error instead of
   returning { error } objects. Error messages include function name,
   what was searched, and available alternatives. Scenarios fail fast
   at the broken step; interactive callers can use try/catch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:33:19 +03:00
Evgeny Martynenkov ebc63c0264 Добавлена Kiro в switch.py 2026-03-01 00:21:33 +03:00
Nick Shirokov 99a5c7168a fix(web-test): real-time video playback via frame duplication
CDP screencast sends frames only on screen changes, causing ffmpeg
to compress pauses and produce sped-up video. Now duplicates the
previous frame to fill timing gaps, maintaining real-time speed.
Also add *.mp4 to .gitignore alongside *.png.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 21:30:46 +03:00
Nick Shirokov 751a6a8f12 fix(web-test): update ffmpeg download links and clarify prerequisites
Use direct gyan.dev URL instead of generic ffmpeg.org. Rewrite recording.md
prerequisites as clear alternatives (project / global / config).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 21:04:31 +03:00
Nick Shirokov 43a2691d6a feat(web-test): add video recording via CDP screencast + ffmpeg
New functions: startRecording, stopRecording, isRecording, showCaption, hideCaption.
Recording guide in recording.md with setup, API, examples, troubleshooting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 20:49:47 +03:00
Nick Shirokov e6da514b67 chore(web-test): add source header comments to all scripts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 19:32:39 +03:00
Nick Shirokov 1e5c42fa56 docs: clarify auto-activation as primary usage mode in platform table
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 19:09:58 +03:00
Nick Shirokov 59627b0699 merge: dev-switch → main — unified cross-platform switch.py 2026-02-28 19:06:32 +03:00
Nick Shirokov 7b69228d23 feat: add unified switch.py for cross-platform skill porting
Single script to copy skills between AI platforms (Cursor, Codex,
Copilot, Gemini CLI, OpenCode) with path rewriting and optional
runtime switching. Includes interactive mode for newcomers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 19:05:12 +03:00
Nick Shirokov da0cedf256 docs: fix web-test description — interaction with web client, not browser automation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 18:24:01 +03:00
Nick Shirokov cc6b170488 docs(web-test): restructure guide — scenarios first, then technical details
User-facing examples and use cases at the top (navigation, search,
documents, reports, extensions, debugging), followed by modes explanation,
autonomous scenario example, then API reference tables.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 18:12:28 +03:00
Nick Shirokov f9439dce6d docs(web-test): expand guide with detailed API, modes, and complex scenario
- Detailed description of autonomous vs interactive modes with examples
- Full API reference with signatures, return shapes, and code samples
- Complex autonomous scenario: compare stock reports across two warehouses
- Troubleshooting table for common errors
- Keyboard shortcuts reference

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 18:05:35 +03:00
Nick Shirokov 336466ae82 merge: dev-web → main — web-test browser automation skill 2026-02-28 17:59:24 +03:00
Nick Shirokov 59d223d72b docs: add web-test guide and README entry
- New docs/web-test-guide.md with usage scenarios, API overview, DCS filters
- README: add web-test row to skills table, directory structure, Node.js requirement

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 17:55:59 +03:00
Nick Shirokov f56f5dc849 docs(web-test): add anti-loop guidelines to SKILL.md
Prevent models from endlessly retrying the same failed search.
Rules: max 2 attempts per approach, try alternatives not repeats,
report partial results instead of silent retry.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 17:53:04 +03:00
Nick Shirokov 1fd3d8ffb8 docs(web-test): rewrite SKILL.md following Anthropic best practices
- Structured API reference with signatures, return types, and inline examples
- Added readSpreadsheet structured format (title, headers, data, totals)
- Added readTable pagination, tree, hierarchy documentation
- Added DCS reportSettings and human-readable labels for fillFields/selectValue
- Added decision guides (when to use which reading/closing method)
- Progressive disclosure: quick start → modes → API → patterns → notes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 17:49:40 +03:00
Nick Shirokov d6befb0dc8 feat(web-test): DCS report settings — human-readable labels for fillFields/selectValue/getFormState
fillFields({ 'Склад': 'value' }) now auto-resolves via DCS pair label
and auto-enables the checkbox. getFormState() returns reportSettings
array with readable names instead of raw КомпоновщикНастроек... fields.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 17:05:16 +03:00
Nick Shirokov 5120b135f5 fix(web-test): use e1cib/app/ for reports and data processors
Reports and DataProcessors need e1cib/app/ prefix (opens app form),
while lists/registers/catalogs use e1cib/list/ (opens list form).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 16:38:21 +03:00