This commit is contained in:
sebastien committed 2026-10-23 08:24:10 +02:00
1 parent c30aac0572
commit 834ffe32f2
7 files changed
+116 -14

No files matched your search

+21
View File
@@ -2129,6 +2129,9 @@ class CopienatorApp(tk.Tk):
return
if step_id == "fetch_batches":
self.after_idle(self._select_batch_integration)
elif (step_id == "correction"
and self.state_store.step(step_id).get("last_run_variant") == "integrate"):
self.after_idle(self._select_after_batch_integration)
elif step_id == "manual_resolution":
self.after_idle(self._select_refaire_correction)
else:
@@ -2241,6 +2244,24 @@ class CopienatorApp(tk.Tk):
self.tree.selection_set("correction")
self.tree.see("correction")
def _select_after_batch_integration(self) -> None:
"""Continue integration with conflict resolution or correction cleanup."""
evaluation = self.state_store.evaluation
if self.runner.running or self.active_step_id or evaluation is None:
return
if has_manual_conflicts(evaluation / "manual_resolutions.txt"):
target = "manual_resolution"
else:
self.state_store.update_step("manual_resolution", status="success")
self.state_store.add_history({
"step": "manual_resolution", "status": "success",
"manual": False, "reason": "Aucun conflit manuel après l’intégration batch.",
})
self._populate_tree()
target = "post_correction"
self.tree.selection_set(target)
self.tree.see(target)
def _select_refaire_correction(self) -> None:
"""Return from manual conflict resolution to the main redo correction."""
if self.runner.running or self.active_step_id or not self.state_store.evaluation:
+3 -3
View File
@@ -80,9 +80,9 @@ class CutHelper(tk.Toplevel):
controls = ttk.Frame(self)
controls.pack(fill="x", padx=8)
ttk.Label(controls, text="Conserver à la source :").pack(side="left")
ttk.Radiobutton(controls, text="1 — début", variable=self.keep, value=1).pack(side="left")
ttk.Radiobutton(controls, text="2 — fin", variable=self.keep, value=2).pack(side="left")
ttk.Radiobutton(controls, text="Ajouter à la cible", variable=self.mode, value=">").pack(side="left")
ttk.Radiobutton(controls, text="1 — début", variable=self.keep, value=1).pack(side="left", padx=(8, 12))
ttk.Radiobutton(controls, text="2 — fin", variable=self.keep, value=2).pack(side="left", padx=(0, 24))
ttk.Radiobutton(controls, text="Ajouter à la cible", variable=self.mode, value=">").pack(side="left", padx=(0, 12))
ttk.Radiobutton(controls, text="Remplacer", variable=self.mode, value="x").pack(side="left")
ttk.Label(self, textvariable=self.caption).pack(anchor="w", padx=8, pady=5)
viewport = ttk.Frame(self)
+7 -1
View File
@@ -193,7 +193,7 @@ class GivingNamesPanel(ttk.LabelFrame):
else "A Rendre n’a pas encore été généré."
)
ttk.Label(self.issue_frame, text=text).grid(
row=0, column=0, columnspan=4, sticky="w"
row=0, column=0, columnspan=5, sticky="w"
)
return
@@ -203,6 +203,9 @@ class GivingNamesPanel(ttk.LabelFrame):
ttk.Label(self.issue_frame, text="Nouveau nom").grid(
row=0, column=1, sticky="w"
)
ttk.Label(self.issue_frame, text="Nom attribué").grid(
row=0, column=4, sticky="w", padx=(12, 0)
)
for row, issue in enumerate(issues, start=1):
ttk.Label(
self.issue_frame,
@@ -226,3 +229,6 @@ class GivingNamesPanel(ttk.LabelFrame):
item, value
),
).grid(row=row, column=3, pady=2)
ttk.Label(self.issue_frame, text=issue.name).grid(
row=row, column=4, sticky="w", padx=(12, 0), pady=2
)