feat: native Qt start panel + kindred:// URL scheme (#167)
Some checks failed
Build and Test / build (pull_request) Has been cancelled

Replace QWebEngineView-based start page with a rich native Qt panel.
QWebEngineView (PySide6.QtWebEngineWidgets) is not available on
conda-forge for Qt6, so the start page was always falling back to a
bare offline widget.

Start panel (silo_start.py):
- Database Items list with search from Silo REST API
- Recent Files from FreeCAD preferences
- Real-time Activity Feed via SSE (SiloEventListener)
- Context menu: Open in Create, Open in Browser, Copy Part Number
- 'Open in Browser' button via QDesktopServices
- Catppuccin Mocha dark theme

kindred:// URL scheme:
- Desktop file registers x-scheme-handler/kindred MIME type
- MainWindow::processMessages() dispatches kindred:// URLs to Python
- handle_kindred_url() in silo_commands.py opens items by part number
- InitGui.py handles kindred:// URLs on cold start via QTimer

Closes #167
This commit is contained in:
2026-02-10 10:30:50 -06:00
parent 8247127905
commit 8b2ce4b73a
3 changed files with 23 additions and 6 deletions

View File

@@ -2,12 +2,12 @@
Name=Kindred Create
GenericName=CAD Application
Comment=Parametric 3D CAD modeler based on FreeCAD
Exec=kindred-create %F
Exec=kindred-create %U
Icon=kindred-create
Terminal=false
Type=Application
Categories=Graphics;Science;Engineering;
MimeType=application/x-extension-fcstd;
MimeType=application/x-extension-fcstd;x-scheme-handler/kindred;
Keywords=CAD;3D;modeling;engineering;design;parametric;
StartupNotify=true
StartupWMClass=KindredCreate

View File

@@ -1700,10 +1700,27 @@ void MainWindow::processMessages(const QList<QString>& msg)
try {
WaitCursor wc;
std::list<std::string> files;
QString action = QStringLiteral("OpenFile:");
QString openFileAction = QStringLiteral("OpenFile:");
QString kindredScheme = QStringLiteral("kindred://");
for (const auto& it : msg) {
if (it.startsWith(action)) {
files.emplace_back(it.mid(action.size()).toStdString());
if (it.startsWith(openFileAction)) {
QString payload = it.mid(openFileAction.size());
if (payload.startsWith(kindredScheme)) {
// Dispatch kindred:// URLs to the Python handler
std::string urlStr = payload.toStdString();
std::string script = "try:\n"
" from silo_commands import handle_kindred_url\n"
" handle_kindred_url('"
+ urlStr
+ "')\n"
"except Exception as e:\n"
" FreeCAD.Console.PrintError("
"'Kindred URL handler error: ' + str(e) + '\\n')\n";
Base::Interpreter().runString(script.c_str());
}
else {
files.emplace_back(payload.toStdString());
}
}
}
files = App::Application::processFiles(files);