Add server mode awareness to the FreeCAD client. The mode (normal,
read-only, degraded, offline) is fetched from the /ready endpoint on
each status refresh and updated in real-time via SSE server.state events.
Changes:
- Add _server_mode global and _fetch_server_mode() helper that queries
/ready and maps response status to mode string
- Add server_mode_changed signal to SiloEventListener, handle
server.state SSE events in _dispatch()
- Add mode banner to SiloAuthDockWidget: colored bar shown when server
is not in normal mode (yellow=read-only, orange=degraded, red=offline)
- Update _refresh_status() to fetch mode and update banner
- Disable write commands (New, Save, Commit, Push) when server is not
in normal mode via IsActive() checks
Closes#4
The freecad/ directory is not a Python package (no __init__.py) — it is
added directly to sys.path by FreeCAD. The relative import
'from .silo_commands import ...' fails when silo_origin is imported as a
top-level module, causing Silo origin registration to silently fail.
Change to absolute import 'from silo_commands import ...' to match
the import style used everywhere else in the directory.
Remove the separate Silo workbench toolbar and Silo_ToggleMode command.
File operations (New/Open/Save) are now handled by the standard File
toolbar via the origin system. The Silo menu retains admin commands
(Settings, Auth, Info, BOM, TagProjects, SetStatus, Rollback).
Closes#65
- Add missing _get_auth_token() function that caused NameError in Settings
- Replace _client.auth_username/role/source() calls with _get_auth_*()
helpers (methods don't exist on SiloClient, crashed auth dock widget)
- Fix connect() in silo_origin.py to show login dialog instead of just
revealing the dock panel (was using non-existent Command.get() API)
- Separate toolbar (file ops) from menu (admin/management commands)
- Remove DEBUG logging from Silo_Save command
- Fix long line formatting in silo_origin.py
FreeCAD workbench for Silo PLM integration. Uses shared silo-client
package (submodule) for API communication.
Changes from monorepo version:
- SiloClient class removed, imported from silo_client package
- FreeCADSiloSettings adapter wraps FreeCAD.ParamGet() preferences
- Init.py adds silo-client to sys.path at startup
- All command classes and UI unchanged