FinceptTerminal is a modern finance application offering advanced market analytics, investment research, and economic data tools, designed for interactive exploration and data-driven decision-making in a user-friendly environment.
C++ ai-agentsalgorithmic-tradingbloomberg-terminalcppfinancefinancial-marketsfintechgood-first-issueinvestmentinvestment-researchmachine-learningopensourcepythonqtquantitative-financestock-markettrading
General updates
tilakpatel22d08eb3abbe59
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex c4dc3b16b..3136252fa 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -189,11 +189,20 @@ jobs:fi# Qt Core DLLs — belt-and-suspenders for anything windeployqt misses.+ # The Qt6WebEngine*/Qt6Qml*/Qt6Quick* set backs the KLineChart trading+ # chart (Equity Trading / Equity Research). windeployqt is unreliable at+ # deploying the WebEngine stack, and v4.1.0 shipped WITHOUT it — opening+ # the Equity Trading tab then crashed because Chromium could not find+ # QtWebEngineProcess.exe. The runtime data files (icudtl.dat / *.pak /+ # locales) and the helper exe are copied in a dedicated block below.for qt_dll in \Qt6Core.dll Qt6Gui.dll Qt6Widgets.dll Qt6Charts.dll Qt6PrintSupport.dll \Qt6Network.dll Qt6Sql.dll Qt6Concurrent.dll Qt6WebSockets.dll \Qt6Multimedia.dll Qt6MultimediaWidgets.dll Qt6OpenGL.dll \- Qt6OpenGLWidgets.dll Qt6Svg.dll Qt6Xml.dll Qt6TextToSpeech.dll; do+ Qt6OpenGLWidgets.dll Qt6Svg.dll Qt6Xml.dll Qt6TextToSpeech.dll \+ Qt6WebEngineCore.dll Qt6WebEngineWidgets.dll Qt6WebChannel.dll \+ Qt6Quick.dll Qt6QuickWidgets.dll Qt6Qml.dll Qt6QmlMeta.dll \+ Qt6QmlModels.dll Qt6QmlWorkerScript.dll Qt6Positioning.dll; do[ -f "${QT_BIN}/${qt_dll}" ] && [ ! -f "${BUILD_DIR}/${qt_dll}" ] && \cp "${QT_BIN}/${qt_dll}" "${BUILD_DIR}/" || truedone@@ -263,6 +272,37 @@ jobs:cp -r resources "${BUILD_DIR}/resources" 2>/dev/null || truebash "${GITHUB_WORKSPACE}/.github/scripts/sync_scripts.sh" scripts "${BUILD_DIR}/scripts"++ # ── Qt WebEngine runtime (KLineChart trading chart) ──────────────────+ # MUST run AFTER the repo-resources copy above so the WebEngine .pak /+ # icudtl.dat files merge INTO the existing resources/ dir (rather than+ # the dir being created here and the repo copy nesting under it).+ # Qt resolves these relative to the exe (qt.conf Prefix=.):+ # ./QtWebEngineProcess.exe ./resources/*.pak + icudtl.dat+ # ./translations/qtwebengine_locales/*.pak+ # Without them, constructing a QWebEngineView aborts the whole process+ # (this is the v4.1.0 Equity-tab crash). The dependency-closure gate+ # below only inspects DLL imports, so it cannot catch these data files —+ # the essential-files check is extended to cover them instead.+ if [ -f "${QT_BIN}/QtWebEngineProcess.exe" ]; then+ cp "${QT_BIN}/QtWebEngineProcess.exe" "${BUILD_DIR}/" || true+ else+ echo "::warning::QtWebEngineProcess.exe not found in ${QT_BIN} — WebEngine chart will be unavailable"+ fi+ # Resource paks + ICU data live in Qt's resources/ dir.+ mkdir -p "${BUILD_DIR}/resources"+ for pak in icudtl.dat qtwebengine_resources.pak qtwebengine_resources_100p.pak \+ qtwebengine_resources_200p.pak qtwebengine_devtools_resources.pak; do+ [ -f "${QT_ROOT_DIR}/resources/${pak}" ] && \+ cp "${QT_ROOT_DIR}/resources/${pak}" "${BUILD_DIR}/resources/" || true+ done+ # WebEngine locale paks (NOT covered by windeployqt --no-translations).+ if [ -d "${QT_ROOT_DIR}/translations/qtwebengine_locales" ]; then+ mkdir -p "${BUILD_DIR}/translations/qtwebengine_locales"+ cp -n "${QT_ROOT_DIR}/translations/qtwebengine_locales/"*.pak \+ "${BUILD_DIR}/translations/qtwebengine_locales/" 2>/dev/null || true+ fi+# qt.conf — pins plugin and data paths relative to the executable.# Without this, Qt falls back to hardcoded build-time paths which# don't exist on a clean machine and cause plugin load failures.@@ -282,6 +322,20 @@ jobs:MISSING=1fidone++ # WebEngine runtime invariant: if we shipped the WebEngine DLL, the+ # helper exe + ICU/resource paks MUST be present too, or the Equity+ # tab crashes Chromium at view creation (the v4.1.0 regression). These+ # are data files the dependency-closure gate can't see, so check here.+ if [ -f "${BUILD_DIR}/Qt6WebEngineCore.dll" ]; then+ for we in QtWebEngineProcess.exe resources/icudtl.dat \+ resources/qtwebengine_resources.pak; do+ if [ ! -f "${BUILD_DIR}/${we}" ]; then+ echo "::error::Missing WebEngine runtime file: ${we} (Equity chart would crash)"+ MISSING=1+ fi+ done+ fi[ "$MISSING" -eq 1 ] && exit 1echo "=== $(find "${BUILD_DIR}" -type f | wc -l) files staged ==="@@ -354,6 +408,62 @@ jobs:}Write-Host "Dependency closure OK - every imported DLL is bundled or provided by Windows."+ # ── Clean-machine smoke test ──────────────────────────────────────────+ # The dependency-closure gate above only inspects DLL IMPORTS. It cannot+ # see missing runtime DATA files / helper exes (QtWebEngineProcess.exe,+ # icudtl.dat, *.pak) or runtime-loaded plugins — those abort the app only+ # when a screen is actually opened, which is exactly how v4.1.0's Equity+ # tab crashed. This step launches the STAGED build with Qt/VS/vcpkg+ # stripped from PATH (so it can use ONLY its bundled runtime + System32,+ # like an end user's clean machine) and walks every screen via+ # --smoke-test. A crash or a non-constructing screen fails the release+ # before it ships. The '[Smoke] >>> constructing <id>' breadcrumbs name+ # the exact screen if it aborts the process.+ - name: Smoke-test staged build (clean PATH, all screens)+ shell: pwsh+ working-directory: fincept-qt+ run: |+ $ErrorActionPreference = 'Stop'+ $buildDir = Join-Path (Get-Location) 'build/Release'+ $exe = Join-Path $buildDir 'FinceptTerminal.exe'+ if (-not (Test-Path $exe)) { Write-Host "::error::exe not found at $exe"; exit 1 }++ # Strip dev toolchains from PATH so ONLY bundled DLLs + System32 resolve+ # (reproduces an end user's machine — the whole point of this gate).+ $env:PATH = (($env:PATH -split ';') | Where-Object {+ $_ -and ($_ -notmatch '(?i)\\Qt') -and ($_ -notmatch '(?i)vcpkg') -and+ ($_ -notmatch '(?i)Microsoft Visual Studio')+ }) -join ';'+ # CI runners have no real GPU — force software GL and disable the+ # Chromium GPU/sandbox so WebEngine init doesn't false-fail headless.+ $env:QT_OPENGL = 'software'+ $env:QTWEBENGINE_DISABLE_SANDBOX = '1'+ $env:QTWEBENGINE_CHROMIUM_FLAGS = '--disable-gpu --no-sandbox --disable-gpu-compositing'++ $out = Join-Path $buildDir 'smoke_stdout.txt'+ $err = Join-Path $buildDir 'smoke_stderr.txt'+ Write-Host "Launching: FinceptTerminal.exe --smoke-test (clean PATH)"+ $p = Start-Process -FilePath $exe `+ -ArgumentList '--smoke-test','--profile','ci-smoke' `+ -WorkingDirectory $buildDir -PassThru `+ -RedirectStandardOutput $out -RedirectStandardError $err+ if (-not $p.WaitForExit(600000)) {+ Write-Host "::error::Smoke test hung (>600s) — likely a blocking dialog or a stalled screen"+ try { $p.Kill($true) } catch {}+ Write-Host "----- stderr tail -----"+ Get-Content $err -Tail 50 -ErrorAction SilentlyContinue+ exit 1+ }+ Write-Host "----- smoke stderr -----"+ Get-Content $err -ErrorAction SilentlyContinue | Select-Object -Last 100+ $code = $p.ExitCode+ Write-Host "Smoke test exit code: $code"+ if ($code -ne 0) {+ Write-Host "::error::Smoke test failed (exit $code) — the last '[Smoke] >>> constructing <id>' line above names the screen that crashed/failed on the bundled runtime."+ exit 1+ }+ Write-Host "Smoke test passed — every screen constructed on the bundled runtime."+# ── Generate Installer ────────────────────────────────────────────────- name: Generate Installer (CPack IFW)shell: bash@@ -365,6 +475,61 @@ jobs:cpack -G IFW -C ${{ env.BUILD_TYPE }} --verbosels -lh ${{ env.APP_NAME }}-*-setup* 2>/dev/null || ls -lh *.exe 2>/dev/null || true+ # ── Validate installer PAYLOAD (not just the stage dir) ───────────────+ # The smoke test above runs against build/Release — the *staged* dir,+ # where every file exists. But CPack's install() rules decide what+ # actually lands in the installer, and a too-narrow rule (e.g. the+ # `*.dll`-only capture that shipped the v4.1.0 WebEngine crash) can drop+ # files the stage dir has. Nothing re-checked the packaged output, so the+ # regression shipped. Silently install to a temp dir and assert the+ # runtime files the app needs are actually present in what the user gets.+ - name: Verify installer payload (silent install + file tree)+ shell: pwsh+ working-directory: fincept-qt/build+ run: |+ $ErrorActionPreference = 'Stop'+ $setup = Get-ChildItem -Filter "${{ env.APP_NAME }}-*-windows-x64-setup.exe" |+ Select-Object -First 1+ if (-not $setup) { Write-Host "::error::installer not found for payload check"; exit 1 }+ $dest = Join-Path $env:RUNNER_TEMP 'fincept-payload-check'+ if (Test-Path $dest) { Remove-Item -Recurse -Force $dest }+ Write-Host "Silent-installing $($setup.Name) -> $dest"+ # IFW silent install: controlscript.qs auto-advances for CLI instances.+ $p = Start-Process -FilePath $setup.FullName -PassThru -Wait `+ -ArgumentList @(+ 'install', '--default-answer', '--accept-licenses',+ '--accept-messages', '--confirm-command',+ "--root", $dest )+ if ($p.ExitCode -ne 0) {+ Write-Host "::error::Silent install failed (exit $($p.ExitCode))"; exit 1+ }+ # Essential files the installed tree MUST contain. WebEngine entries+ # are conditional: only required if the WebEngine DLL was packaged.+ $missing = 0+ $required = @(+ 'FinceptTerminal.exe', 'Qt6Core.dll', 'Qt6Gui.dll', 'Qt6Widgets.dll',+ 'qt.conf', 'platforms/qwindows.dll', 'sqldrivers/qsqlite.dll'+ )+ if (Test-Path (Join-Path $dest 'Qt6WebEngineCore.dll')) {+ $required += @(+ 'QtWebEngineProcess.exe',+ 'resources/icudtl.dat',+ 'resources/qtwebengine_resources.pak'+ )+ }+ foreach ($f in $required) {+ if (-not (Test-Path (Join-Path $dest $f))) {+ Write-Host "::error::Installer payload missing: $f (would crash on a clean machine)"+ $missing = 1+ }+ }+ if ($missing) {+ Write-Host "----- installed tree (top level) -----"+ Get-ChildItem $dest | Select-Object Name | Format-Table -AutoSize+ exit 1+ }+ Write-Host "Installer payload OK — all essential runtime files present in the shipped tree."+# ── Upload ────────────────────────────────────────────────────────────# Narrow the glob to the installer output — the broader `*.exe` pattern# would also catch the main FinceptTerminal.exe binary, which we don'tdiff --git a/docs/CPP_CONTRIBUTOR_GUIDE.md b/docs/CPP_CONTRIBUTOR_GUIDE.mdindex 5dfba0236..656e4e603 100644--- a/docs/CPP_CONTRIBUTOR_GUIDE.md+++ b/docs/CPP_CONTRIBUTOR_GUIDE.md@@ -27,7 +27,7 @@ cmake --preset <win-release|linux-release|macos-release>cmake --build --preset <same-preset>```-> **Older or RAM-constrained machines:** add `--parallel 4` (or any small number) to cap concurrent compile jobs. The default saturates every core, which can overheat older CPUs and slow the rest of your system. Example: `cmake --build --preset macos-release --parallel 4`.+> **RAM-constrained machines:** the build now **auto-caps** concurrent compiles from your available RAM (a Ninja job pool in `CMakeLists.txt`) — 12-wide MSVC/Qt compiles otherwise need 15–48 GB and will swap a 16 GB box until the whole OS hangs. Override per-machine with `-DFINCEPT_MAX_COMPILE_JOBS=N` (or cap ninja directly with `--parallel N`). Also keep **≥5 GB RAM free** while building: the 1000+ object link needs ~3–4 GB and pages badly when starved (a one-line rebuild can jump from ~5 s to minutes). Full rationale: *Build performance & machine requirements* in `CLAUDE.md`.Debug variants: `win-debug`, `linux-debug`, `macos-debug`. See `fincept-qt/CMakePresets.json`.diff --git a/docs/GETTING_STARTED.md b/docs/GETTING_STARTED.mdindex d55f4d7bc..0429f4e19 100644--- a/docs/GETTING_STARTED.md+++ b/docs/GETTING_STARTED.md@@ -339,6 +339,15 @@ python scripts/yfinance_data.py quote AAPL # Test directlysudo apt install libgl1-mesa-dev libglu1-mesa-dev```+### Build is extremely slow or hangs the whole computer++Almost always **RAM exhaustion**, not a broken toolchain:++- The build auto-caps parallel compiles based on your RAM (a Ninja job pool in `CMakeLists.txt`). If you removed it or forced a large `-j`, restore it — 12 simultaneous MSVC/Qt compiles need 15–48 GB and will swap a 16 GB machine until the OS freezes. Tune per-machine with `-DFINCEPT_MAX_COMPILE_JOBS=N`.+- **Keep ≥5 GB RAM free while building.** The final link (1000+ objects) needs ~3–4 GB; starved of memory it pages and a one-line rebuild balloons from ~5 s to **minutes**. Close browsers / IDEs / other heavy apps first.+- **Windows:** add Microsoft Defender real-time exclusions for the repo + `build/` tree and the `cl.exe` / `link.exe` / `ninja.exe` / `cmake.exe` binaries — scanning the 100 k+ build files is a big per-compile tax.+- A normal one-line incremental rebuild should be **~5–6 s**. If it's much slower, check **free RAM first**. Full rationale: *Build performance & machine requirements* in `CLAUDE.md`.+---## Getting Helpdiff --git a/fincept-qt/CMakeLists.txt b/fincept-qt/CMakeLists.txtindex eb1313c43..c2bf69e08 100644--- a/fincept-qt/CMakeLists.txt+++ b/fincept-qt/CMakeLists.txt@@ -201,6 +201,70 @@ if(DEFINED ENV{CI})set(FINCEPT_ENABLE_LTO ON CACHE BOOL "" FORCE)endif()+# ── Build concurrency cap (RAM-aware) ────────────────────────────────────────+# THE most important knob on a memory-constrained machine, and the fix for+# "the build hangs my whole computer". Ninja defaults to one compile job per+# logical core. Each MSVC Qt/C++20 translation unit peaks at ~1.2-1.6 GB+# (non-unity dev) up to ~3-4 GB (unity Release, batch 20) of RAM. Running one+# per core (e.g. 12 on a 6c/12t laptop) therefore demands 15-48 GB; on a box+# with ~16 GB the kernel spills to the pagefile and the ENTIRE MACHINE stalls,+# not just the build. The linker is hungrier still and must never run two at+# once.+#+# Ninja "job pools" cap concurrency independently of the -j the caller passes,+# so the limit holds from a bare `cmake --build`, an IDE, or CI alike. We size+# the compile pool from physical RAM: reserve headroom for the OS + (on AMD+# APUs) the iGPU's shared carve-out + the linker, then divide the remainder by+# a per-job RAM budget that depends on whether unity is on. Auto-sizing means a+# 64 GB workstation still gets full core utilisation while a 16 GB laptop stops+# thrashing. Override explicitly with -DFINCEPT_MAX_COMPILE_JOBS=N (>=1).+if(CMAKE_GENERATOR MATCHES "Ninja")+ cmake_host_system_information(RESULT _fincept_ram_mb QUERY TOTAL_PHYSICAL_MEMORY)+ cmake_host_system_information(RESULT _fincept_ncores QUERY NUMBER_OF_LOGICAL_CORES)++ # Per-compile RAM budget (MB). Unity TUs bundle up to BATCH_SIZE files into a+ # single cl.exe and need far more headroom than a lone non-unity dev TU.+ if(FINCEPT_DEV_BUILD)+ set(_fincept_mb_per_job 2048) # non-unity, /Z7, PCH+ else()+ set(_fincept_mb_per_job 3072) # unity batch 20 + optimiser+ endif()++ # RAM kept free for the OS, background apps, the iGPU shared pool, and the+ # link step (which runs concurrently with the tail of the compile phase).+ set(_fincept_ram_reserve_mb 5120)++ if(_fincept_ram_mb GREATER _fincept_ram_reserve_mb)+ math(EXPR _fincept_ram_jobs+ "(${_fincept_ram_mb} - ${_fincept_ram_reserve_mb}) / ${_fincept_mb_per_job}")+ else()+ set(_fincept_ram_jobs 1)+ endif()++ # Clamp to [2, logical cores]: never serialise to 1 on a healthy box, never+ # oversubscribe past the core count even when RAM is plentiful.+ if(_fincept_ram_jobs LESS 2)+ set(_fincept_ram_jobs 2)+ endif()+ if(_fincept_ram_jobs GREATER _fincept_ncores)+ set(_fincept_ram_jobs ${_fincept_ncores})+ endif()++ set(FINCEPT_MAX_COMPILE_JOBS "${_fincept_ram_jobs}" CACHE STRING+ "Max concurrent compile jobs (Ninja job pool). Auto-sized from RAM; override to taste.")++ set_property(GLOBAL PROPERTY JOB_POOLS+ fincept_compile_pool=${FINCEPT_MAX_COMPILE_JOBS}+ fincept_link_pool=1)+ set(CMAKE_JOB_POOL_COMPILE fincept_compile_pool)+ set(CMAKE_JOB_POOL_LINK fincept_link_pool)++ message(STATUS+ "Build concurrency cap: ${FINCEPT_MAX_COMPILE_JOBS} compile job(s) + 1 link "+ "(host ${_fincept_ram_mb} MB RAM / ${_fincept_ncores} cores, "+ "${_fincept_mb_per_job} MB per-job budget). Override: -DFINCEPT_MAX_COMPILE_JOBS=N")+endif()+# MSVC compiler flags for maximum build throughput:# /Z7 — embed debug info in .obj instead of shared PDB → no PDB write# contention (major speedup with parallel compilation)@@ -1919,6 +1983,7 @@ set(SCREEN_SOURCESset(APP_SOURCESsrc/app/main.cppsrc/app/InstanceLock.cpp+ src/app/ScreenSmokeTest.cpp# WindowFrame is split across multiple files; see WindowFrame.cpp header# comment for the layout. All variants stay outside unity build (see# SKIP_UNITY_BUILD_INCLUSION block below).@@ -3167,19 +3232,44 @@ if(WIN32)get_filename_component(_fincept_qt_prefix "${Qt6_DIR}/../../.." ABSOLUTE)list(APPEND _fincept_qt_bin_hints "${_fincept_qt_prefix}/bin")endif()+ # Dev redeploy trigger: wipe the windeployqt stamp on every configure so the+ # next build re-runs windeployqt exactly once (see the dev/release split below).+ if(FINCEPT_DEV_BUILD)+ file(REMOVE "${CMAKE_BINARY_DIR}/windeployqt_dev.stamp")+ endif()find_program(WINDEPLOYQT_EXE windeployqt HINTS ${_fincept_qt_bin_hints})unset(_fincept_qt_bin_hints)if(WINDEPLOYQT_EXE)- # Always deploy Qt DLLs/plugins next to the exe. windeployqt is- # idempotent and copy_if_different — incremental cost is ~1-2 s- # when nothing changed. The previous DEPLOY_QT=ON gate caused the- # exe to run against a stale plugin set after a clean rebuild,- # producing 0xc0000005 crashes on startup.- add_custom_command(TARGET FinceptTerminal POST_BUILD- COMMAND "${WINDEPLOYQT_EXE}"- ARGS "--no-translations" "--no-compiler-runtime" "$<TARGET_FILE:FinceptTerminal>"- COMMENT "Running windeployqt..."- )+ # Deploy Qt DLLs/plugins next to the exe. windeployqt re-walks the WHOLE Qt+ # dependency tree (every QtQuick/Controls QML + plugin + WebEngine .pak) on+ # EVERY run — measured ~30 s on this project even when it copies nothing+ # ("X is up to date" x1400). On every incremental relink that tax dominates+ # the build, so we split by build type:+ # • Release → always run. Guarantees a correct, fresh plugin set; the old+ # DEPLOY_QT gate once shipped a stale set → 0xc0000005 crashes on launch.+ # • Dev → run ONCE per configure via a stamp, then skip. The stamp is+ # deleted at configure time (above), so any CMake re-run — including the+ # auto-reconfigure CMake performs when you edit CMakeLists to add a Qt+ # module — forces one fresh redeploy. Plain .cpp edits skip windeployqt,+ # turning a ~35 s build into ~5 s. Force a redeploy by deleting+ # build/<preset>/windeployqt_dev.stamp or reconfiguring.+ if(FINCEPT_DEV_BUILD)+ add_custom_command(TARGET FinceptTerminal POST_BUILD+ COMMAND "${CMAKE_COMMAND}"+ -D "WDQT=${WINDEPLOYQT_EXE}"+ -D "EXE=$<TARGET_FILE:FinceptTerminal>"+ -D "STAMP=${CMAKE_BINARY_DIR}/windeployqt_dev.stamp"+ -P "${CMAKE_CURRENT_SOURCE_DIR}/cmake/deploy_qt_once.cmake"+ COMMENT "windeployqt (dev: once per configure, then skipped)..."+ VERBATIM+ )+ else()+ add_custom_command(TARGET FinceptTerminal POST_BUILD+ COMMAND "${WINDEPLOYQT_EXE}"+ ARGS "--no-translations" "--no-compiler-runtime" "$<TARGET_FILE:FinceptTerminal>"+ COMMENT "Running windeployqt..."+ )+ endif()endif()# ── Optional: override sqldrivers from a known-consistent Qt install ──────@@ -3568,6 +3658,32 @@ if(FINCEPT_BUILD_INSTALLER)COMPONENT coreFILES_MATCHINGPATTERN "*.dll")+ # Qt WebEngine runtime helper + data files. windeployqt / the CI stage+ # step place these next to the exe in the build dir, but the *.dll+ # pattern above silently drops them: QtWebEngineProcess.exe is an .exe,+ # and the Chromium data lives in resources/*.pak + resources/icudtl.dat+ # and translations/qtwebengine_locales/*.pak. If they're absent from the+ # installed tree, constructing a QWebEngineView aborts the whole process+ # (the v4.1.0 Equity-tab crash). These install() calls are OPTIONAL so a+ # build without WebEngine (HAS_WEBENGINE=FALSE → no helper staged) still+ # packages cleanly; the runtime probe in KLineChartWidget degrades to the+ # Qt-Charts fallback in that case.+ install(FILES "$<TARGET_FILE_DIR:FinceptTerminal>/QtWebEngineProcess.exe"+ DESTINATION "." COMPONENT core OPTIONAL)+ # Chromium resource paks + ICU data. The source resources/ tree is+ # installed separately below (app assets); these are *additional* files+ # the CI stage step dropped into the build dir's resources/ folder, so+ # capture them by name from the staged dir rather than re-globbing.+ install(FILES+ "$<TARGET_FILE_DIR:FinceptTerminal>/resources/icudtl.dat"+ "$<TARGET_FILE_DIR:FinceptTerminal>/resources/qtwebengine_resources.pak"+ "$<TARGET_FILE_DIR:FinceptTerminal>/resources/qtwebengine_resources_100p.pak"+ "$<TARGET_FILE_DIR:FinceptTerminal>/resources/qtwebengine_resources_200p.pak"+ "$<TARGET_FILE_DIR:FinceptTerminal>/resources/qtwebengine_devtools_resources.pak"+ DESTINATION "resources" COMPONENT core OPTIONAL)+ # WebEngine locale paks (not covered by windeployqt --no-translations).+ install(DIRECTORY "$<TARGET_FILE_DIR:FinceptTerminal>/translations/qtwebengine_locales"+ DESTINATION "translations" COMPONENT core OPTIONAL)# Python analytics scripts (4000+ files) — required at runtime by# PythonRunner / ExchangeService. Without this the Crypto tab and all# Python-backed screens crash on an installed build.diff --git a/fincept-qt/CMakePresets.json b/fincept-qt/CMakePresets.jsonindex d39dc2b59..7ff9fc275 100644--- a/fincept-qt/CMakePresets.json+++ b/fincept-qt/CMakePresets.json@@ -16,7 +16,7 @@{"name": "win-dev","displayName": "Windows Dev (fast incremental)",- "description": "Dev build — unity OFF + /DEBUG:FASTLINK incremental linking + PCH for fast single-file rebuilds (~10s vs ~2min). FINCEPT_DEV_BUILD drives the dev-only tweaks in CMakeLists.txt.",+ "description": "Dev build — unity OFF + /DEBUG:FASTLINK incremental linking + PCH + RAM-capped Ninja compile pool + windeployqt-once-per-configure. ~5-6s per one-line change WHEN >5GB RAM is free; the 1000+ object link is RAM-bound and balloons to minutes (even hangs the OS at 12-wide) on a memory-starved machine. Override the pool with -DFINCEPT_MAX_COMPILE_JOBS=N. FINCEPT_DEV_BUILD drives the dev-only tweaks in CMakeLists.txt.","inherits": "base","condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows" },"architecture": { "value": "x64", "strategy": "external" },diff --git a/fincept-qt/cmake/deploy_qt_once.cmake b/fincept-qt/cmake/deploy_qt_once.cmakenew file mode 100644index 000000000..14fb376eb--- /dev/null+++ b/fincept-qt/cmake/deploy_qt_once.cmake@@ -0,0 +1,27 @@+# deploy_qt_once.cmake — run windeployqt at most once per configure (dev builds).+#+# Invoked from CMakeLists.txt as a POST_BUILD step:+# cmake -DWDQT=<windeployqt> -DEXE=<exe> -DSTAMP=<stampfile> -P deploy_qt_once.cmake+#+# windeployqt re-walks the ENTIRE Qt dependency tree on every run (every+# QtQuick/Controls QML file, every plugin, every WebEngine .pak) — ~30 s on this+# project even when it copies nothing. On a dev machine that tax lands on every+# incremental relink. To avoid it, the dev build deploys once and drops a stamp;+# the configure step deletes the stamp (see CMakeLists "Windows: deploy Qt DLLs"),+# so any CMake re-run — including the auto-reconfigure CMake does when you edit+# CMakeLists to add a Qt module — forces exactly one fresh redeploy. Plain .cpp+# edits skip it. Force a redeploy by deleting the stamp or reconfiguring.+if(EXISTS "${STAMP}")+ message(STATUS "windeployqt: Qt runtime already deployed since last configure — skipping (~30 s saved). Delete '${STAMP}' to force.")+ return()+endif()++message(STATUS "windeployqt: deploying Qt runtime (first build since configure)...")+execute_process(+ COMMAND "${WDQT}" "--no-translations" "--no-compiler-runtime" "${EXE}"+ RESULT_VARIABLE _wdqt_rc+)+if(NOT _wdqt_rc EQUAL 0)+ message(FATAL_ERROR "windeployqt failed with exit code ${_wdqt_rc}")+endif()+file(WRITE "${STAMP}" "deployed\n")diff --git a/fincept-qt/src/app/ScreenSmokeTest.cpp b/fincept-qt/src/app/ScreenSmokeTest.cppnew file mode 100644index 000000000..d2034736f--- /dev/null+++ b/fincept-qt/src/app/ScreenSmokeTest.cpp@@ -0,0 +1,79 @@+#include "app/ScreenSmokeTest.h"++#include "app/DockScreenRouter.h"+#include "core/logging/Logger.h"++#include <QCoreApplication>+#include <QElapsedTimer>+#include <QEventLoop>+#include <QString>+#include <QStringList>++#include <cstdio>++namespace fincept {++namespace {+// Pump the event loop for `ms` so showEvent, deferred singleShot(100) init, and+// lazy web-view / chart construction actually run before we judge the screen.+// We do NOT wait for data fetches to finish — only for the widget tree to build.+void spin(int ms) {+ QElapsedTimer t;+ t.start();+ while (t.elapsed() < ms)+ QCoreApplication::processEvents(QEventLoop::AllEvents, 50);+}+} // namespace++int run_screen_smoke_test(DockScreenRouter* router) {+ if (!router) {+ std::fprintf(stderr, "[Smoke] FAIL: no router\n");+ std::fflush(stderr);+ return 2;+ }++ const QStringList ids = router->all_screen_ids();+ std::fprintf(stderr, "[Smoke] walking %d screens\n", static_cast<int>(ids.size()));+ std::fflush(stderr);+ LOG_INFO("Smoke", QString("Screen smoke test: %1 screens").arg(ids.size()));++ QStringList failures;+ for (const QString& id : ids) {+ // Breadcrumb BEFORE construction so a hard process abort (e.g. a missing+ // QtWebEngineProcess.exe) names the culprit as the last line in the log.+ std::fprintf(stderr, "[Smoke] >>> constructing %s\n", qUtf8Printable(id));+ std::fflush(stderr);+ LOG_INFO("Smoke", QString("constructing %1").arg(id));++ // exclusive=true closes the previously-opened screen before opening this+ // one, so panels don't accumulate (non-exclusive navigation re-layouts an+ // ever-growing set → O(n^2) and a multi-minute walk). We only need each+ // screen open long enough to construct + fire showEvent.+ router->navigate(id, /*exclusive=*/true);+ spin(300);++ if (!router->screen_widget(id)) {+ failures << id;+ std::fprintf(stderr, "[Smoke] !!! %s did not construct\n", qUtf8Printable(id));+ std::fflush(stderr);+ }+ }++ if (failures.isEmpty()) {+ std::fprintf(stderr, "[Smoke] OK: all %d screens constructed\n",+ static_cast<int>(ids.size()));+ std::fflush(stderr);+ LOG_INFO("Smoke", "All screens constructed OK");+ return 0;+ }++ std::fprintf(stderr, "[Smoke] FAIL: %d screen(s) did not construct: %s\n",+ static_cast<int>(failures.size()), qUtf8Printable(failures.join(", ")));+ std::fflush(stderr);+ LOG_ERROR("Smoke", QString("%1 screen(s) failed: %2")+ .arg(failures.size())+ .arg(failures.join(", ")));+ return 1;+}++} // namespace finceptdiff --git a/fincept-qt/src/app/ScreenSmokeTest.h b/fincept-qt/src/app/ScreenSmokeTest.hnew file mode 100644index 000000000..99f817c96--- /dev/null+++ b/fincept-qt/src/app/ScreenSmokeTest.h@@ -0,0 +1,25 @@+#pragma once++namespace fincept {++class DockScreenRouter;++// Screen-construction smoke test. Walks every screen registered with `router`,+// navigating to each so its factory runs AND showEvent fires — which is where+// the fragile native runtimes actually get instantiated (Qt WebEngine views,+// Qt Charts, QGeoView map tiles, multimedia). This catches the class of failure+// that static DLL-dependency walking (dumpbin /dependents) can NEVER see:+// missing runtime DATA files and helper executables — e.g. QtWebEngineProcess+// .exe / icudtl.dat / *.pak — that abort the process only when a screen opens.+// It is meant to run on a clean machine (Qt/VS stripped from PATH) so the app+// can use only its bundled runtime, reproducing an end user's environment.+//+// Each screen id is written to stderr (flushed) BEFORE construction, so if a+// screen hard-aborts the process the culprit's id is the last line in the log.+//+// Returns 0 if every screen constructed, 1 if any failed to construct (or a+// non-zero process exit on a hard crash, which is itself the CI signal), and 2+// on harness error (null router).+int run_screen_smoke_test(DockScreenRouter* router);++} // namespace finceptdiff --git a/fincept-qt/src/app/main.cpp b/fincept-qt/src/app/main.cppindex 1598c1173..906168fc7 100644--- a/fincept-qt/src/app/main.cpp+++ b/fincept-qt/src/app/main.cpp@@ -5,6 +5,7 @@#include "services/llm/LlmService.h"#include "ui/notifications/DesktopNotifier.h"#include "app/MonitorPickerDialog.h"+#include "app/ScreenSmokeTest.h"#include "app/WindowFrame.h"#include "app/TerminalShell.h"#include "core/window/WindowRegistry.h"@@ -114,6 +115,7 @@#include <QUuid>#include <algorithm>+#include <cstdio>#include <memory>#include "app/InstanceLock.h"@@ -937,6 +939,21 @@ int main(int argc, char* argv[]) {// itself offloads prefill_completed_steps() to a background thread (P1).auto setup_status = fincept::python::PythonSetupManager::instance().check_status();+ // --smoke-test: CI/clean-machine screen-construction walk. Force the normal+ // boot path (we need a real WindowFrame + router to navigate every screen),+ // and skip the Python first-run SetupScreen — the smoke test only verifies+ // that screens CONSTRUCT on the bundled runtime, not that data fetches work.+ // The actual walk is scheduled just after the primary window is shown.+ bool smoke_mode = false;+ for (int i = 1; i < argc; ++i) {+ if (qstrcmp(argv[i], "--smoke-test") == 0)+ smoke_mode = true;+ }+ if (smoke_mode) {+ LOG_INFO("Smoke", "Smoke-test mode — forcing normal boot, skipping setup/recovery");+ setup_status.needs_setup = false;+ }+if (setup_status.needs_setup) {LOG_INFO("App", "Python environment not ready — showing setup screen");@@ -1016,7 +1033,7 @@ int main(int argc, char* argv[]) {// secondary-window restoration paths to avoid duplicating windows.bool recovered = false;if (auto* recovery = fincept::TerminalShell::instance().crash_recovery();- recovery && recovery->needs_recovery()) {+ !smoke_mode && recovery && recovery->needs_recovery()) {fincept::screens::CrashRecoveryDialog dlg(recovery, fincept::TerminalShell::instance().snapshot_ring());dlg.exec();@@ -1040,6 +1057,22 @@ int main(int argc, char* argv[]) {auto* primary = new fincept::WindowFrame(primary_id);primary->setAttribute(Qt::WA_DeleteOnClose);primary->show();++ // Smoke test: once the window has painted, walk every screen and exit+ // with the result. Deferred so the shell + router are fully wired. The+ // CI job runs this with Qt/VS stripped from PATH, so a missing bundled+ // runtime (DLL, plugin, or data file like QtWebEngineProcess.exe) shows+ // up as a hard process abort or a non-constructing screen here — exactly+ // the class of failure the static dependency gate cannot detect.+ if (smoke_mode) {+ QPointer<fincept::WindowFrame> w = primary;+ QTimer::singleShot(2500, &app, [w]() {+ const int rc = fincept::run_screen_smoke_test(w ? w->dock_router() : nullptr);+ std::fprintf(stderr, "[Smoke] exit %d\n", rc);+ std::fflush(stderr);+ QCoreApplication::exit(rc);+ });+ }}// Wire new-window handler + Launchpad surface — see wire_app_lifecycle()diff --git a/fincept-qt/src/screens/launchpad/OnboardingTour.cpp b/fincept-qt/src/screens/launchpad/OnboardingTour.cppindex b4d5168f5..208e38727 100644--- a/fincept-qt/src/screens/launchpad/OnboardingTour.cpp+++ b/fincept-qt/src/screens/launchpad/OnboardingTour.cpp@@ -71,7 +71,13 @@ void OnboardingTour::build_ui() {heading_ = new QLabel(this);QFont tf = heading_->font();- tf.setPointSizeF(tf.pointSizeF() * 1.4);+ // App font is pixel-sized (pointSizeF() == -1), so scale whichever metric+ // is actually set — multiplying a -1 point size yields a negative value+ // that setPointSizeF rejects with a warning.+ if (tf.pixelSize() > 0)+ tf.setPixelSize(qRound(tf.pixelSize() * 1.4));+ else if (tf.pointSizeF() > 0)+ tf.setPointSizeF(tf.pointSizeF() * 1.4);tf.setBold(true);heading_->setFont(tf);root->addWidget(heading_);@@ -117,7 +123,11 @@ QWidget* OnboardingTour::build_step(const QString& title, const QString& body,auto* h = new QLabel(title, w);QFont hf = h->font();hf.setBold(true);- hf.setPointSizeF(hf.pointSizeF() * 1.15);+ // See note above — scale the pixel size when the font is pixel-defined.+ if (hf.pixelSize() > 0)+ hf.setPixelSize(qRound(hf.pixelSize() * 1.15));+ else if (hf.pointSizeF() > 0)+ hf.setPointSizeF(hf.pointSizeF() * 1.15);h->setFont(hf);l->addWidget(h);diff --git a/fincept-qt/src/ui/charts/KLineChartWidget.cpp b/fincept-qt/src/ui/charts/KLineChartWidget.cppindex a6413bb88..fe939508c 100644--- a/fincept-qt/src/ui/charts/KLineChartWidget.cpp+++ b/fincept-qt/src/ui/charts/KLineChartWidget.cpp@@ -1,5 +1,7 @@#include "ui/charts/KLineChartWidget.h"+#include "core/logging/Logger.h"+#ifdef HAS_QT_WEBENGINE#include <QWebEngineProfile>#include <QWebEngineSettings>@@ -10,9 +12,11 @@#include <QContextMenuEvent>#include <QCoreApplication>#include <QDateTime>+#include <QFileInfo>#include <QJsonDocument>#include <QJsonObject>#include <QLabel>+#include <QLibraryInfo>#include <QMenu>#include <QMouseEvent>#include <QPointer>@@ -45,6 +49,35 @@ class ChartWebView : public QWebEngineView {private:KLineChartWidget* host_;};++// HAS_QT_WEBENGINE is a COMPILE-time flag (Qt WebEngine was present on the build+// machine). It says nothing about whether the *runtime* the app actually ships+// with is complete. Qt WebEngine spawns a helper process — QtWebEngineProcess+// (.exe on Windows) — and loads ICU/resource .pak files alongside it. If the+// deployment is missing the helper (e.g. the installer didn't bundle it), the+// Chromium bootstrap calls abort() the instant a QWebEngineView is constructed,+// taking the whole app down — and it cannot be caught in C++. So we must detect+// a broken/absent runtime BEFORE creating any view and degrade to the Qt-Charts+// fallback. Probe the locations Qt searches for the helper: the Qt+// libexec dir, the app dir, and an app/bin subdir.+bool webengine_runtime_available() {+#ifdef Q_OS_WIN+ const QString proc = QStringLiteral("QtWebEngineProcess.exe");+#else+ const QString proc = QStringLiteral("QtWebEngineProcess");+#endif+ const QString app = QCoreApplication::applicationDirPath();+ const QStringList candidates = {+ QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath) + QStringLiteral("/") + proc,+ app + QStringLiteral("/") + proc,+ app + QStringLiteral("/bin/") + proc,+ };+ for (const QString& c : candidates) {+ if (QFileInfo::exists(c))+ return true;+ }+ return false;+}} // namespace#endif@@ -66,7 +99,16 @@ KLineChartWidget::KLineChartWidget(QWidget* parent) : QWidget(parent) {bool KLineChartWidget::is_available() const {#ifdef HAS_QT_WEBENGINE- return true;+ // Computed once: the runtime layout can't change while the app is running.+ static const bool ok = []() {+ const bool present = webengine_runtime_available();+ if (!present)+ LOG_WARN("KLineChart",+ "Qt WebEngine runtime not found (QtWebEngineProcess missing from "+ "deployment) — falling back to the Qt-Charts chart");+ return present;+ }();+ return ok;#elsereturn false;#endif@@ -82,6 +124,11 @@ void KLineChartWidget::ensure_web_view() {#ifdef HAS_QT_WEBENGINEif (initialized_)return;+ // Defense-in-depth: never create a QWebEngineView when the runtime helper is+ // absent — doing so aborts the process. Callers normally gate on+ // is_available(), but guard here too so any direct user is crash-safe.+ if (!webengine_runtime_available())+ return;initialized_ = true;web_view_ = new ChartWebView(this);diff --git a/fincept-qt/src/ui/theme/ThemeManager.cpp b/fincept-qt/src/ui/theme/ThemeManager.cppindex 55b668a76..724d4cf21 100644--- a/fincept-qt/src/ui/theme/ThemeManager.cpp+++ b/fincept-qt/src/ui/theme/ThemeManager.cpp@@ -539,12 +539,20 @@ QString ThemeManager::build_global_qss() const {.arg(t.icon_hover) // %19.arg(t.positive) // %20.arg(t.negative) // %21- .arg(t.warning) // %22- .arg(t.positive_dim) // %23- .arg(t.negative_dim) // %24- .arg(t.accent_bg) // %25- .arg(t.positive_bg) // %26- .arg(t.negative_bg); // %27+ .arg(t.warning); // %22+ // NOTE: the chain stops at %22 on purpose. The QSS body's only higher+ // "%NN" tokens are the URL-encoded '#' (%23) inside the inline SVG icon+ // data-URIs (e.g. stroke='%2380808080'). QString::arg fills placeholders by+ // ASCENDING number across the whole string, so a 23rd .arg() would land on+ // those %23 SVG tokens — overwriting the icon stroke colors (producing the+ // malformed '#dc262680808080' strokes) and emitting "Argument missing" for+ // every arg past the last real placeholder. With exactly 22 args, %1..%22+ // fill in call order and every %23 stays literal for Qt's QSS URL-decoder.+ // Verified empirically against Qt 6.8.3. Do NOT add args for positive_dim /+ // negative_dim / accent_bg / positive_bg / negative_bg here — they are not+ // referenced anywhere in this stylesheet. If you need them, add a real+ // %23+ placeholder AND escape the SVG '#' a different way (%% is NOT an+ // arg() escape — confirmed — so that approach does not work).}QString ThemeManager::build_ads_qss() const {diff --git a/fincept-qt/src/ui/widgets/GroupBadge.cpp b/fincept-qt/src/ui/widgets/GroupBadge.cppindex 278739cc7..1040fe0d3 100644--- a/fincept-qt/src/ui/widgets/GroupBadge.cpp+++ b/fincept-qt/src/ui/widgets/GroupBadge.cpp@@ -137,7 +137,14 @@ void GroupBadge::paintEvent(QPaintEvent*) {// Letterp.setPen(QColor("#ffffff"));QFont f = p.font();- f.setPointSizeF(f.pointSizeF() - 1.0);+ // The app font is defined in PIXELS (ThemeManager::current_font uses+ // setPixelSize), so pointSizeF() returns -1 here. Subtracting from -1 yields+ // a negative point size that QFont::setPointSizeF rejects with a warning and+ // ignores. Shrink whichever metric the inherited font actually uses.+ if (f.pixelSize() > 0)+ f.setPixelSize(f.pixelSize() > 1 ? f.pixelSize() - 1 : 1);+ else if (f.pointSizeF() > 0)+ f.setPointSizeF(f.pointSizeF() - 1.0);f.setBold(true);p.setFont(f);const QString label = group_ == SymbolGroup::None