Conversation
…into bidi-domain-js
…into bidi-domain-js
PR Summary by QodoAlign JavaScript BiDi generation with the low-level domain contract
AI Description
Diagram
High-Level Assessment
Files changed (9)
|
Code Review by Qodo
1.
|
|
Code review by qodo was updated up to the latest commit 50586c4 |
|
Code review by qodo was updated up to the latest commit 4a45dbd |
|
Failed tests are dotnet and not related to this PR. |
| if (target === undefined) return null // not in this domain — cross-domain, left unresolved | ||
| if (target.kind === 'record') return { runtimeName: normalizeDottedName(targetName), kind: 'record' } | ||
| if (target.kind === 'union') return { runtimeName: `${normalizeDottedName(targetName)}Union`, kind: 'union' } | ||
| current = target // another alias — keep resolving |
There was a problem hiding this comment.
2. Alias loop comment repeats the code 📘 Rule violation ⚙ Maintainability
resolveAliasRuntime annotates current = target with another alias — keep resolving, which merely narrates the assignment and loop continuation. When alias traversal changes, this redundant narration can drift from the loop condition instead of explaining why traversal is safe or intentionally limited.
Agent Prompt
## Issue description
The inline comment beside the alias-loop assignment restates the visible mechanics without documenting rationale, constraints, or intent.
## Fix Focus Areas
- javascript/selenium-webdriver/generate_bidi.mjs[851-851]
## Recommended Fix
Remove the inline comment. If a non-obvious traversal constraint needs documentation, replace it with a concise explanation of that constraint rather than narrating the assignment.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
Code review by qodo was updated up to the latest commit 7c5daf8 |
|
Code review by qodo was updated up to the latest commit 83659e5 |
🔗 Related Issues
Related to docs/decisions/17786-bidi-low-level-behavioral-contract.md
(#17786).
💥 What does this PR do?
Replaces the BiDi TypeScript generator's per-domain output with classes
that extend the shared Domain base (bidi/domain.js) instead of standalone
modules with hand-rolled connection glue.
Commands validate outbound
params and parse inbound results through the runtime schema layer
(defineRecord/defineEnum/defineUnion).
Events are exposed as static EventDescriptor constants consumed via the generic Domain#addCallback(),
replacing one hand-generated on() method per event.
Brings the generated output in line with the low-level BiDi behavioral
contract in docs/decisions/17786-bidi-low-level-behavioral-contract.md
([adr] Behavioral contract for the low-level WebDriver BiDi layer #17786).
🔧 Implementation Notes
🤖 AI assistance
🔄 Types of changes