Replace Sync Status button with F5 keyboard shortcut

The visible button was confusing since auto-polling handles status
updates. Power users can press F5 to manually sync if needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
rob 2026-01-16 21:43:37 -04:00
parent 9f60e84075
commit 4756ea906c
1 changed files with 5 additions and 16 deletions

View File

@ -12,7 +12,7 @@ from PySide6.QtWidgets import (
QPushButton, QGroupBox, QMessageBox, QFrame QPushButton, QGroupBox, QMessageBox, QFrame
) )
from PySide6.QtCore import Qt, QThread, Signal, QTimer from PySide6.QtCore import Qt, QThread, Signal, QTimer
from PySide6.QtGui import QFont, QColor, QBrush from PySide6.QtGui import QFont, QColor, QBrush, QShortcut, QKeySequence
from ...tool import ( from ...tool import (
Tool, ToolArgument, PromptStep, CodeStep, ToolStep, Tool, ToolArgument, PromptStep, CodeStep, ToolStep,
@ -234,14 +234,6 @@ class ToolsPage(QWidget):
btn_layout.addStretch() btn_layout.addStretch()
# Sync status button (only when connected)
self.btn_sync = QPushButton("Sync Status")
self.btn_sync.setObjectName("secondary")
self.btn_sync.clicked.connect(self._sync_tool_status)
self.btn_sync.setEnabled(False)
self.btn_sync.setToolTip("Check registry for updated moderation status")
btn_layout.addWidget(self.btn_sync)
# Connect/Publish button # Connect/Publish button
config = load_config() config = load_config()
if config.registry.token: if config.registry.token:
@ -255,6 +247,10 @@ class ToolsPage(QWidget):
layout.addWidget(buttons) layout.addWidget(buttons)
# Keyboard shortcut: F5 to sync status
self._sync_shortcut = QShortcut(QKeySequence("F5"), self)
self._sync_shortcut.activated.connect(self._sync_tool_status)
def _update_connection_status(self): def _update_connection_status(self):
"""Update the connection status label.""" """Update the connection status label."""
config = load_config() config = load_config()
@ -596,16 +592,9 @@ class ToolsPage(QWidget):
if config.registry.token: if config.registry.token:
# Connected - enable Publish when tool selected # Connected - enable Publish when tool selected
self.btn_publish.setEnabled(has_selection) self.btn_publish.setEnabled(has_selection)
# Enable Sync when tool selected and has registry_hash
if has_selection:
state, registry_hash = get_tool_publish_state(self._current_tool.name)
self.btn_sync.setEnabled(registry_hash is not None)
else:
self.btn_sync.setEnabled(False)
else: else:
# Not connected - Connect button is always enabled # Not connected - Connect button is always enabled
self.btn_publish.setEnabled(True) self.btn_publish.setEnabled(True)
self.btn_sync.setEnabled(False)
def _create_tool(self): def _create_tool(self):
"""Create a new tool.""" """Create a new tool."""