Skip to content

Gnomon Control & Live Status

Choose a tag to compare

@ArcaneSphere ArcaneSphere released this 29 Dec 04:49
· 15 commits to main since this release

1. Gnomon Process Control

  • Implemented start/stop buttons in the Gnomon manager page (gnomon.js) that now successfully launch and terminate the gnomonindexer process.
  • Fixed the renderer ↔ main communication using ipcRenderer.invoke and ipcMain.handle for gnomon:start and gnomon:stop.
  • Ensured persistent state of Gnomon with a gnomonRunning flag to track whether it’s active.

2. Gnomon Status Checking

  • Added check-gnomon handler to verify if Gnomon’s API is responsive (via HTTP request to 127.0.0.1:8099).
  • Added gnomon:get-info to fetch detailed information from Gnomon’s /api/getinfo.
  • Updated the Gnomon manager UI to reflect running/stopped status with a yellow/green/red LED indicator.

3. Live Logs

  • Wired up gnomon-log events to stream stdout/stderr from the Gnomon process to the renderer.
  • Ensured logs are displayable in real-time, though some display issues remain in the UI.

4. Start Page (start.html) Integration

  • Explored auto-refresh / live updates when Gnomon starts.
  • Integrated SCID fetching via the Gnomon API (/indexedscs and /scvarsbyheight).
  • Not fully functional yet: SCIDs don’t update live when Gnomon starts or indexes new entries.

5. App Lifecycle & Cleanup

  • Implemented graceful shutdown of Gnomon when the app closes:

    • Listens for before-quit, window-all-closed, SIGINT, SIGTERM.
    • Sends SIGINT to Gnomon and waits for exit.
    • Fallback timeout to SIGKILL in case it hangs.
  • Prevents orphaned Gnomon processes.


6. Debugging & Renderer Safety

  • Added checks in the renderer (gnomon.js) to ensure electronAPI is available.
  • Allowed logs and state updates even if Gnomon crashes or is stopped manually.