refactorai-cli 0.5.1__tar.gz → 0.5.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/PKG-INFO +1 -1
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/pyproject.toml +1 -1
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/__init__.py +1 -1
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/commands/watch_cmds.py +9 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/watch_state.py +46 -7
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli.egg-info/PKG-INFO +1 -1
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/README.md +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/auth.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/client.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/cloud_rr.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/commands/__init__.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/commands/account_cmds.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/commands/auth_cmds.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/commands/branch_cmds.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/commands/cloud_cmds.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/commands/engine_cmds.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/commands/hook_cmds.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/commands/model_cmds.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/commands/pre_push_cmds.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/commands/request_cmds.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/commands/rules_cmds.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/commands/run_cmds.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/commands/runtime_cmds.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/commands/runtime_proxy_cmds.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/commands/setup_cmds.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/commands/toolchains_cmds.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/commit_queue.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/commit_telemetry.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/control_plane.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/credentials.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/dotenv_loader.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/git_scope.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/local_constitution.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/local_engine_runtime.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/local_paths.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/main.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/model_policy.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/pre_push_gate.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/refactor_branch_store.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/review_runner.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/runtime_manager.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/settings.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/setup_flow.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli/watch_supervisor.py +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli.egg-info/SOURCES.txt +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli.egg-info/dependency_links.txt +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli.egg-info/entry_points.txt +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli.egg-info/requires.txt +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/refactorai_cli.egg-info/top_level.txt +0 -0
- {refactorai_cli-0.5.1 → refactorai_cli-0.5.2}/setup.cfg +0 -0
|
@@ -688,6 +688,15 @@ def _dispatch_key(live, project_root: Path, key: str, state: WatchState) -> None
|
|
|
688
688
|
f"Press [{key}] again.[/dim]"
|
|
689
689
|
)
|
|
690
690
|
return
|
|
691
|
+
if not state.has_pending_work():
|
|
692
|
+
# Nothing anywhere needs review/merge: this is the idle steady
|
|
693
|
+
# state, so guide toward the next commit rather than implying the
|
|
694
|
+
# user picked the wrong node.
|
|
695
|
+
console.print(
|
|
696
|
+
"[dim]watch: all commits are reviewed and resolved — "
|
|
697
|
+
"watching for the next commit.[/dim]"
|
|
698
|
+
)
|
|
699
|
+
return
|
|
691
700
|
console.print(
|
|
692
701
|
f"[dim]watch: selected {node.short_sha} ({node.branch or 'detached'} / "
|
|
693
702
|
f"phase={node.phase}, requests={node.rr_count}) has nothing to "
|
|
@@ -199,6 +199,27 @@ class WatchState:
|
|
|
199
199
|
and node.sha not in self.forced_review
|
|
200
200
|
)
|
|
201
201
|
|
|
202
|
+
def has_pending_work(self) -> bool:
|
|
203
|
+
"""True when any node still needs attention (review, resolve, or merge).
|
|
204
|
+
|
|
205
|
+
Drives the terminal's idle vs. active affordances: when this is ``False``
|
|
206
|
+
every commit is reviewed with no open requests and nothing to finalize,
|
|
207
|
+
so the footer should say "watching for the next commit" rather than
|
|
208
|
+
advertising review/merge hotkeys the user can't act on.
|
|
209
|
+
"""
|
|
210
|
+
for node in self._nodes.values():
|
|
211
|
+
if node.state in (QUEUED, REVIEWING):
|
|
212
|
+
return True
|
|
213
|
+
if (
|
|
214
|
+
node.state == REVIEWED
|
|
215
|
+
and node.rr_count > 0
|
|
216
|
+
and (node.phase == PHASE_REVIEW or node.sha in self.forced_review)
|
|
217
|
+
):
|
|
218
|
+
return True
|
|
219
|
+
if node.phase == PHASE_FINALIZE and node.sha not in self.forced_review:
|
|
220
|
+
return True
|
|
221
|
+
return False
|
|
222
|
+
|
|
202
223
|
def has(self, sha: str) -> bool:
|
|
203
224
|
return sha in self._nodes
|
|
204
225
|
|
|
@@ -522,6 +543,7 @@ def _render_review_view(state: WatchState, *, now: datetime | None = None, width
|
|
|
522
543
|
lines.append(_with_pad(row))
|
|
523
544
|
lines.append(_with_pad(Text.from_markup("[cyan]+[/cyan]")))
|
|
524
545
|
lines.append(_with_pad(Text("")))
|
|
546
|
+
pending = state.has_pending_work()
|
|
525
547
|
selected = state.selected()
|
|
526
548
|
if selected is not None:
|
|
527
549
|
context = Text.from_markup("[bold bright_cyan]selected[/bold bright_cyan]: ")
|
|
@@ -531,15 +553,32 @@ def _render_review_view(state: WatchState, *, now: datetime | None = None, width
|
|
|
531
553
|
context.append(f" requests={selected.rr_count}", style="dim")
|
|
532
554
|
lines.append(_with_pad(context))
|
|
533
555
|
lines.append(_with_pad(Text("")))
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
556
|
+
if pending:
|
|
557
|
+
lines.append(
|
|
558
|
+
_with_pad(
|
|
559
|
+
Text.from_markup(
|
|
560
|
+
"[dim]\\[↑/↓ or j/k][/dim] select [bold]\\[r][/bold] refactor "
|
|
561
|
+
"[bold]\\[f][/bold] fresh review [bold]\\[d][/bold] diff "
|
|
562
|
+
"[bold]\\[q][/bold] quit"
|
|
563
|
+
)
|
|
564
|
+
)
|
|
565
|
+
)
|
|
566
|
+
else:
|
|
567
|
+
# Everything is reviewed and resolved: switch to an idle affordance so the
|
|
568
|
+
# user isn't offered review/merge keys that would no-op (docs/41 Part F).
|
|
569
|
+
lines.append(
|
|
570
|
+
_with_pad(
|
|
571
|
+
Text.from_markup("[green]✓ all commits reviewed[/green] — [dim]watching for the next commit[/dim]")
|
|
572
|
+
)
|
|
573
|
+
)
|
|
574
|
+
lines.append(
|
|
575
|
+
_with_pad(
|
|
576
|
+
Text.from_markup(
|
|
577
|
+
"[dim]\\[↑/↓ or j/k][/dim] select [bold]\\[d][/bold] diff "
|
|
578
|
+
"[bold]\\[q][/bold] quit"
|
|
579
|
+
)
|
|
540
580
|
)
|
|
541
581
|
)
|
|
542
|
-
)
|
|
543
582
|
return Group(*lines)
|
|
544
583
|
|
|
545
584
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|