Skip to content

Conversation

myieye
Copy link
Collaborator

@myieye myieye commented Oct 1, 2025

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.

Copy link

coderabbitai bot commented Oct 1, 2025

📝 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
Copy link

github-actions bot commented Oct 1, 2025

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.

Copy link

argos-ci bot commented Oct 1, 2025

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

Copy link

github-actions bot commented Oct 1, 2025

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
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