Skip to content

Fix Linux app#2016

Merged
myieye merged 2 commits into
developfrom
fix-linux-app-2
Oct 1, 2025
Merged

Fix Linux app#2016
myieye merged 2 commits into
developfrom
fix-linux-app-2

Conversation

@myieye

@myieye myieye commented Oct 1, 2025

Copy link
Copy Markdown
Collaborator

A previous job run demonstrated that this exposes the problem that this PR is fixing:

image

Note: The CI step that tests running the Linux executable while presumably be superseded by #1866. This was just the quickest way to have something useable.

@coderabbitai

coderabbitai Bot commented Oct 1, 2025

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Adds a runtime smoke-test step to the Linux publish workflow; updates FwLiteWeb to resolve working directory more defensively at startup; disables compression in FwLiteWeb build; adds Linux-specific SQLitePCLRaw dependencies to LcmCrdt; improves null-safety in RichString tag comparison; and configures Vite to clean the output directory before builds.

Changes

Cohort / File(s) Summary
CI workflow: Linux publish smoke test
.github/workflows/fw-lite.yaml
Adds a step to chmod and run the Linux-built FwLiteWeb for 10s; treats exit code 0 or timeout 124 as success; logs output and fails on other exits.
Backend startup: working directory resolution
backend/FwLite/FwLiteWeb/Program.cs
Replaces direct Directory.SetCurrentDirectory with logic deriving appDirectory from assembly location, falling back to AppContext.BaseDirectory, then sets current directory accordingly.
Backend build config: compression flag
backend/FwLite/FwLiteWeb/FwLiteWeb.csproj
Adds <CompressionEnabled>false</CompressionEnabled> to the primary PropertyGroup.
Backend platform deps: Linux SQLite
backend/FwLite/LcmCrdt/LcmCrdt.csproj
Adds Linux-conditioned ItemGroup referencing SQLitePCLRaw packages (bundle_e_sqlite3, core, lib.e_sqlite3, provider.e_sqlite3).
Backend model: null-safety
backend/FwLite/MiniLcm/Models/RichString.cs
Updates Tags comparison in RichSpan.EqualsProps to null-check both sides before SequenceEqual to avoid null reference.
Frontend build: clean output
frontend/viewer/vite.config.ts
Sets build.emptyOutDir to true to empty the output directory before building.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

💻 FW Lite

Suggested reviewers

  • hahn-kev

Poem

I thump my paws—deploy at night,
A 10-second run, the logs look right.
Paths resolved, no wander wide,
SQLite packed for Linux ride.
Vite sweeps clean—outdir bright.
Hippity hop, we ship with might! 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning There is no pull request description provided, so reviewers lack any summary of the changes or context, which makes the description completely unrelated to the changeset. Please add a concise description that outlines the objectives of the pull request and highlights the key changes, such as the new Linux workflow test, compression setting update, and directory resolution improvements.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The title “Fix Linux app” refers to real Linux-related changes in the pull request—such as adding Linux-specific dependencies, improving the workflow test for Linux, and enhancing directory resolution on Linux—but it is quite generic and does not specify the primary modifications made.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-linux-app-2

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ae5c668 and 92cd8b7.

📒 Files selected for processing (6)
  • .github/workflows/fw-lite.yaml (1 hunks)
  • backend/FwLite/FwLiteWeb/FwLiteWeb.csproj (1 hunks)
  • backend/FwLite/FwLiteWeb/Program.cs (1 hunks)
  • backend/FwLite/LcmCrdt/LcmCrdt.csproj (1 hunks)
  • backend/FwLite/MiniLcm/Models/RichString.cs (1 hunks)
  • frontend/viewer/vite.config.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-05-22T03:51:17.255Z
Learnt from: hahn-kev
PR: sillsdev/languageforge-lexbox#1692
File: backend/FwLite/MiniLcm/Models/RichString.cs:62-238
Timestamp: 2025-05-22T03:51:17.255Z
Learning: In the RichMultiString implementation, the RichSpan record properly compares equality of all fields including styling attributes like Bold, not just the Text property, as verified by dedicated tests in RichMultiStringTests.cs.

Applied to files:

  • backend/FwLite/MiniLcm/Models/RichString.cs
🧬 Code graph analysis (1)
backend/FwLite/FwLiteWeb/Program.cs (1)
backend/FwLite/FwLiteWeb/FwLiteWebServer.cs (1)
  • FwLiteWebServer (20-136)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Build UI / publish-ui
  • GitHub Check: Build FwHeadless / publish-fw-headless
  • GitHub Check: Build API / publish-api
  • GitHub Check: check-and-lint
  • GitHub Check: Analyze (csharp)
  • GitHub Check: Build FW Lite and run tests
  • GitHub Check: frontend-component-unit-tests
  • GitHub Check: frontend
🔇 Additional comments (6)
backend/FwLite/LcmCrdt/LcmCrdt.csproj (1)

23-28: LGTM! Linux SQLite dependencies added correctly.

The Linux-specific SQLitePCLRaw dependencies are properly gated behind the platform condition and will enable SQLite functionality on Linux builds.

frontend/viewer/vite.config.ts (1)

12-12: LGTM! Clean output directory before builds.

Setting emptyOutDir: true ensures stale files are removed before each build, which is a good practice especially when building into a shared wwwroot directory.

backend/FwLite/MiniLcm/Models/RichString.cs (1)

330-330: LGTM! Improved null-safety in Tags comparison.

The additional null checks prevent potential NullReferenceException when one side's Tags is null and the other is non-null, making the comparison more robust.

.github/workflows/fw-lite.yaml (1)

220-234: LGTM! Effective Linux smoke test.

The test correctly validates that the Linux build runs without crashing. The logic properly handles timeout (exit code 124) and clean exit (0) as success, while failing on any other exit code. The 10-second duration is reasonable for a smoke test.

backend/FwLite/FwLiteWeb/FwLiteWeb.csproj (1)

8-8: LGTM! Compression disabled for local app.

Disabling response compression is reasonable for a local desktop application where network latency is minimal and the CPU overhead of compression may not be beneficial.

backend/FwLite/FwLiteWeb/Program.cs (1)

6-10: LGTM! Robust working directory resolution.

The defensive approach correctly handles edge cases where Assembly.Location might be empty (e.g., single-file deployments) and where Path.GetDirectoryName might return null. The fallback to AppContext.BaseDirectory ensures a valid directory is always set.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the 💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related label Oct 1, 2025
@github-actions

github-actions Bot commented Oct 1, 2025

Copy link
Copy Markdown
Contributor

UI unit Tests

  1 files  ±0   45 suites  ±0   31s ⏱️ +2s
111 tests ±0  111 ✅ ±0  0 💤 ±0  0 ❌ ±0 
160 runs  ±0  160 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 92cd8b7. ± Comparison against base commit ae5c668.

♻️ This comment has been updated with latest results.

@argos-ci

argos-ci Bot commented Oct 1, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Oct 1, 2025, 12:00 PM

@github-actions

github-actions Bot commented Oct 1, 2025

Copy link
Copy Markdown
Contributor

C# Unit Tests

130 tests  ±0   130 ✅ ±0   20s ⏱️ -1s
 20 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 92cd8b7. ± Comparison against base commit ae5c668.

@myieye myieye merged commit 633e734 into develop Oct 1, 2025
30 checks passed
@myieye myieye deleted the fix-linux-app-2 branch October 1, 2025 12:27
myieye added a commit that referenced this pull request May 28, 2026
Frontend (pnpm) — direct: @sveltejs/kit 2.49→2.60.1, @opentelemetry/sdk-node
0.208→0.217, @opentelemetry/auto-instrumentations-node 0.67→0.75, js-cookie
3.0.5→3.0.7. Catalog: svelte→5.55.7, vite→7.3.2, postcss→8.5.10. In viewer:
lint-staged 13→15 (clears micromatch + yaml advisories naturally). Minimal
pnpm.overrides for the three transitives that don't have a clean parent-bump
path: cookie (SvelteKit still pins ^0.6), minimatch@9 (mjml→js-beautify chain),
immutable@3 (graphql-codegen→relay-compiler@12 chain).

Platform.Bible extension (npm) — webpack/postcss/glob direct bumps,
copy-webpack-plugin 12→14 (clears serialize-javascript), single override for
tmp (old zip-build→inquirer@8 chain). npm install regenerated package-lock.

GitHub Actions — bump actions/{checkout,setup-node,setup-dotnet,upload-artifact,
download-artifact} v4→v5, pnpm/action-setup and arduino/setup-task SHA pins
→ v5/v2 tags, actions/labeler v5→v6, all for Node-24 compatibility ahead of
the June 2026 deprecation.

FwLiteMaui — bump android SupportedOSPlatformVersion 23→24 to clear CA1416
warnings on BlazorWebView APIs (Android 6.0 Marshmallow is rounding-error
share in 2026; the WebView is the app, so the platform attribute was
inaccurate, not actually enabling API 23 support).

FwLiteWeb — drop the Assembly.Location dance, use AppContext.BaseDirectory
directly (IL3000). Provably equivalent for an entry assembly — the runtime
guarantees the DLL lives next to the host EXE and BaseDirectory points there.
Comment cross-refs #2016 so the Linux single-file history isn't lost.

Not fixed (need follow-up issues): mjml ≤4.18.0 (no patch in v4 line — needs
v5 migration; html-minifier ReDoS is transitive via it).

Co-authored-by: Claude <noreply@anthropic.com>
myieye added a commit that referenced this pull request Jun 1, 2026
Frontend (pnpm) — direct: @sveltejs/kit 2.49→2.60.1, @opentelemetry/sdk-node
0.208→0.217, @opentelemetry/auto-instrumentations-node 0.67→0.75, js-cookie
3.0.5→3.0.7. Catalog: vite→7.3.2, postcss→8.5.10. In viewer: lint-staged 13→15
(clears micromatch + yaml advisories naturally). Minimal pnpm.overrides for the
three transitives that don't have a clean parent-bump path: cookie (SvelteKit
still pins ^0.6), minimatch@9 (mjml→js-beautify chain), immutable@3
(graphql-codegen→relay-compiler@12 chain).

Platform.Bible extension (npm) — webpack/postcss/glob direct bumps,
copy-webpack-plugin 12→14 (clears serialize-javascript), single override for
tmp (old zip-build→inquirer@8 chain). npm install regenerated package-lock.

GitHub Actions — bump actions/{checkout,setup-node,setup-dotnet,upload-artifact,
download-artifact} v4→v5, pnpm/action-setup and arduino/setup-task SHA pins
→ v5/v2 tags, actions/labeler v5→v6, SHA-pin remaining actions, all for Node-24
compatibility ahead of the June 2026 deprecation. Drop the unused Claude Code
workflow.

FwLiteMaui — bump android SupportedOSPlatformVersion 23→24 to clear CA1416
warnings on BlazorWebView APIs (Android 6.0 Marshmallow is rounding-error
share in 2026; the WebView is the app, so the platform attribute was
inaccurate, not actually enabling API 23 support).

FwLiteWeb — drop the Assembly.Location dance, use AppContext.BaseDirectory
directly (IL3000). Provably equivalent for an entry assembly — the runtime
guarantees the DLL lives next to the host EXE and BaseDirectory points there.
Comment cross-refs #2016 so the Linux single-file history isn't lost.

The svelte 5.53→5.55 bump and the detached-resource test harness that rode
along on this branch have moved to a separate PR; this PR is dependency/CI
bumps only.

Not fixed (need follow-up issues): mjml ≤4.18.0 (no patch in v4 line — needs
v5 migration; html-minifier ReDoS is transitive via it).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant