Skip to content

fix(focus): fiabilise la saisie et les panneaux natifs - #46

Merged
Destynova2 merged 3 commits into
mainfrom
fix/saisie-approbations-focus
Oct 5, 2026
Merged

Destynova2 merged 3 commits into
mainfrom
fix/saisie-approbations-focus

Conversation

@Destynova2

@Destynova2 Destynova2 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Text replacement now prefers AX value updates and verifies the exact value, including empty and already-correct fields. Keyboard fallback requires confirmed field focus and a full selection or a known empty value. Delayed clicks are observed without replaying the action, and audit diffs retain the pre-action state.

Raw preauthorization is scoped to the process and window, validates its budget and lifetime, and cannot approve batches, file selection or high-risk element actions. Native save panels are offered as explicit attachment candidates, including CG-hidden service panels paired with a visible host proxy. Failed attachment preserves the previous target and snapshot.

Focus confirmation checks the target process's AXFocusedWindow; it does not prove global keyboard ownership. Matching panel bounds remain a relationship hint, not proof of ownership.

Builds on the refactoring merged in #45.

Validation: 315 workspace/all-target tests passed. The normal push hooks passed, including formatting, Clippy with warnings denied, Gitleaks, offline links, cargo-deny, rustdoc coverage, cargo-audit and cargo-machete.

- dédoublonne panic_payload_message et les troncatures de chaînes
  dans engine/runtime_support
- retire le code mort : hover_at_point, Bbox::as_quad, uniform_scale,
  dev-dep serde_json de dunst-vision
- supprime l'enum ScrollStrategy à variante unique et la politique
  BrowserTabReusePolicy dont seul Host était câblé
- découpe scroll_at, run_demo et run_serve en fonctions nommées
- borne les casts de shapes.rs via les helpers ratio et to_index
…anneau natif Enregistrer sous

- saisie texte AX-first avec focus + sélection vérifiés, refus de l'append aveugle
- clics différés sans replay après timeout, diff pré-action conservé
- préautorisation bornée (pid/fenêtre, budget, TTL), batch et file gates exclus
- detect_native_panel : repère le panneau « Open and Save Panel Service » couplé
  géométriquement à la fenêtre cible (même CG-hidden), propose la cible sans bascule
- attach transactionnel + focus_window confirmé par AX (window_focus.rs)
@Destynova2 Destynova2 closed this Oct 5, 2026
@Destynova2 Destynova2 reopened this Oct 5, 2026
Base automatically changed from refactor/audit-simplifications to main October 5, 2026 21:37
Comment on lines +91 to +94
unsafe {
core_foundation_sys::base::CFEqual(element.as_ptr().cast(), focused.as_ptr().cast())
!= 0
}
Comment on lines +155 to +164
unsafe {
AXValueGetType(value.as_CFTypeRef() as AXValueRef) == kAXValueTypeCFRange
&& AXValueGetValue(
value.as_CFTypeRef() as AXValueRef,
kAXValueTypeCFRange,
(&mut actual as *mut CFRange).cast(),
)
&& actual.location == 0
&& actual.length == len
}
@Destynova2
Destynova2 marked this pull request as ready for review October 5, 2026 21:40
@Destynova2
Destynova2 enabled auto-merge (squash) October 5, 2026 21:40
@Destynova2
Destynova2 merged commit af4ee57 into main Oct 5, 2026
23 checks passed
@Destynova2
Destynova2 deleted the fix/saisie-approbations-focus branch October 5, 2026 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants