Fix: rebuild from clean main (previous push included unrelated contaminated content)
This commit is contained in:
@@ -374,9 +374,6 @@ class ServerEditor(QFrame):
|
||||
self.spawn_btn.setToolTip("Spawn the server for 3 s and report whether it starts cleanly")
|
||||
self.spawn_btn.clicked.connect(self._test_spawn)
|
||||
self.spawn_btn.setVisible(False)
|
||||
self.logs_btn = QPushButton("View logs")
|
||||
self.logs_btn.setToolTip("Open this server's MCP log in a read-only, auto-tailing viewer")
|
||||
self.logs_btn.clicked.connect(self._view_logs)
|
||||
self.details_btn = QPushButton("Details ▸")
|
||||
self.details_btn.setCheckable(True)
|
||||
self.details_btn.toggled.connect(self._toggle_diag)
|
||||
@@ -387,7 +384,6 @@ class ServerEditor(QFrame):
|
||||
dep.addWidget(self.fix_btn)
|
||||
dep.addWidget(self.test_btn)
|
||||
dep.addWidget(self.spawn_btn)
|
||||
dep.addWidget(self.logs_btn)
|
||||
dep.addWidget(self.details_btn)
|
||||
dep.addWidget(recheck)
|
||||
outer.addLayout(dep)
|
||||
@@ -732,13 +728,6 @@ class ServerEditor(QFrame):
|
||||
elif self.diag_card.isVisible():
|
||||
self.diag_text.setPlainText(self._full_diag_text())
|
||||
|
||||
def _view_logs(self):
|
||||
name = self.current_name()
|
||||
if not name:
|
||||
return
|
||||
dlg = LogViewerDialog(self.window(), name)
|
||||
dlg.exec()
|
||||
|
||||
|
||||
# --------------------------------------------------------------------------- #
|
||||
# Arguments editor: one line = one argument, with a numbered gutter so that
|
||||
@@ -1115,7 +1104,7 @@ class MainWindow(QMainWindow):
|
||||
self.full_config: dict = {}
|
||||
self.servers: list[core.ServerEntry] = []
|
||||
self.current_profile: core.Profile | None = None
|
||||
self._loaded_stat: core.ConfigStat | None = None
|
||||
self._loaded_mtime: float | None = None
|
||||
self.dirty = False
|
||||
self._suppress_table = False
|
||||
self._suppress_sel = False
|
||||
@@ -1391,7 +1380,7 @@ class MainWindow(QMainWindow):
|
||||
return
|
||||
self.full_config = cfg
|
||||
repaired = True
|
||||
self._loaded_stat = core.config_fingerprint(profile.path)
|
||||
self._loaded_mtime = core.config_mtime(profile.path)
|
||||
self.current_profile = profile
|
||||
self.servers = core.extract_servers(self.full_config)
|
||||
self.dirty = False
|
||||
@@ -1734,14 +1723,11 @@ class MainWindow(QMainWindow):
|
||||
return
|
||||
|
||||
# Stale-file check: if the file changed on disk since we loaded it, prompt.
|
||||
# Compare mtime AND size (not mtime alone) so a concurrent external write
|
||||
# that lands within the mtime resolution window, or that restores the
|
||||
# original mtime, still gets caught.
|
||||
disk_stat = core.config_fingerprint(self.current_profile.path)
|
||||
disk_mtime = core.config_mtime(self.current_profile.path)
|
||||
if (
|
||||
disk_stat is not None
|
||||
and self._loaded_stat is not None
|
||||
and disk_stat != self._loaded_stat
|
||||
disk_mtime is not None
|
||||
and self._loaded_mtime is not None
|
||||
and disk_mtime != self._loaded_mtime
|
||||
):
|
||||
changed_keys, server_diff = core.external_change_summary(
|
||||
self.full_config, self.current_profile.path
|
||||
@@ -1762,7 +1748,7 @@ class MainWindow(QMainWindow):
|
||||
QMessageBox.critical(self, "Save failed", str(e))
|
||||
return
|
||||
self.full_config = fresh
|
||||
self._loaded_stat = core.config_fingerprint(self.current_profile.path)
|
||||
self._loaded_mtime = core.config_mtime(self.current_profile.path)
|
||||
self.current_profile.config_exists = True
|
||||
self.dirty = False
|
||||
self.save_btn.setEnabled(False)
|
||||
@@ -1780,7 +1766,7 @@ class MainWindow(QMainWindow):
|
||||
except Exception as e:
|
||||
QMessageBox.critical(self, "Save failed", str(e))
|
||||
return
|
||||
self._loaded_stat = core.config_fingerprint(self.current_profile.path)
|
||||
self._loaded_mtime = core.config_mtime(self.current_profile.path)
|
||||
self.current_profile.config_exists = True
|
||||
self.dirty = False
|
||||
self.save_btn.setEnabled(False)
|
||||
|
||||
Reference in New Issue
Block a user