Skip to content

fix(chat_app): honor backend switch and context auto mode#48

Merged
leehack merged 2 commits intomainfrom
fix/chat-app-backend-switch
Feb 15, 2026
Merged

fix(chat_app): honor backend switch and context auto mode#48
leehack merged 2 commits intomainfrom
fix/chat-app-backend-switch

Conversation

@leehack
Copy link
Owner

@leehack leehack commented Feb 15, 2026

Summary

  • Align chat runtime backend status with selected backend so CPU mode is reflected correctly and GPU indicators do not report false positives.
  • Preserve configured GPU layers when switching backend preference, letting load-time backend logic enforce CPU offload behavior.
  • Restore Context Size Auto mode by allowing/saving 0 in settings and using engine-derived context limits during session management.
  • Add regression tests for backend switching behavior and context-size auto persistence.

Testing

  • flutter test test/unit_test.dart test/settings_service_test.dart
  • flutter analyze

Keep backend status indicators aligned with user selection and preserve configured GPU layers across switches. Persist context size auto as 0 so runtime can use backend/model defaults, with tests covering both regressions.
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.26%. Comparing base (72848b2) to head (e163fb5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #48   +/-   ##
=======================================
  Coverage   78.26%   78.26%           
=======================================
  Files          60       60           
  Lines        4637     4637           
=======================================
  Hits         3629     3629           
  Misses       1008     1008           
Flag Coverage Δ
unittests 78.26% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@leehack leehack merged commit f4e9778 into main Feb 15, 2026
4 checks passed
@leehack leehack deleted the fix/chat-app-backend-switch branch February 15, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants