Skip to content

WebView evaluation: Stay with KMP, implement CEF mitigation for Desktop#39

Merged
paulpv merged 3 commits into
mainfrom
copilot/re-evaluate-webview-solution
Dec 23, 2025
Merged

WebView evaluation: Stay with KMP, implement CEF mitigation for Desktop#39
paulpv merged 3 commits into
mainfrom
copilot/re-evaluate-webview-solution

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 23, 2025

Context

PR #36 revealed KMP's Desktop WebView (JavaFX WebKit) inadequate for modern SPAs like GitHub Copilot Agents. Evaluated whether to pivot frameworks or stay with KMP.

Decision

Stay with KMP + implement JCEF mitigation

Android WebView (Chromium): production-ready ⭐⭐⭐⭐⭐
Desktop WebView (JavaFX WebKit): limited ⭐⭐☆☆☆

Issue is localized (one platform, one component). Pivot costs months; mitigation takes 3-5 days.

Deliverables

docs/WEBVIEW_EVALUATION.md (691 lines)

Comprehensive analysis:

  • KMP WebView bifurcation (Android excellent, Desktop limited)
  • 11 frameworks evaluated (Qt, React Native, Flutter, Electron, .NET MAUI, etc.)
  • Comparative matrix with WebView quality ratings
  • 4 mitigation options with effort estimates
  • Decision factors with weighted scoring

Key finding: Qt has best WebView (QtWebEngine everywhere), but poor mobile ecosystem and wearable support. No framework is perfect—KMP's strengths (WebRTC, audio, wearables) justify staying.

docs/WEBVIEW_DECISION_SUMMARY.md (176 lines)

Executive summary with acceptance criteria status, rationale, next steps.

Updated docs/FRAMEWORK_EVALUATION.md

Added WebView quality column to comparison matrices. 8 cross-references to evaluation.

Updated README.md

Linked to evaluation documents.

Recommended Mitigation

Phase 1: JCEF (Java Chromium Embedded Framework) for Desktop

  • Replace JavaFX WebView with Chromium-based JCEF
  • Proven technology (IntelliJ IDEA uses it)
  • Effort: 3-5 days

Phase 2 (Fallback): External browser for Desktop Agent Tab

  • Simple "Open in Browser" button
  • Effort: 1 day

Framework Comparison

Framework WebView Trade-off
KMP ★★★☆☆ (split) Mitigatable, keeps native strengths
Qt ⭐⭐⭐⭐⭐ Poor mobile/wearable ecosystem
React Native ⭐⭐⭐⭐☆ Desktop needs separate Electron app
Flutter ★★★☆☆ Same Desktop WebView issues
Electron ⭐⭐⭐⭐⭐ No mobile (blocker)
.NET MAUI ⭐⭐⭐⭐☆ WebKit on macOS/iOS

Mobile-first use case prioritizes Android (where KMP WebView excels). Agent Tab is secondary feature; core voice functionality unaffected.

Original prompt

This section details on the original issue you should resolve

<issue_title>Re-evaluate WebView solution for Codeoba: Is Kotlin Multi Platform's WebView viable, or should we pivot to Qt/other frameworks?</issue_title>
<issue_description>## Summary
Recent implementation work reveals that Kotlin Multi Platform’s (KMP) WebView—especially on Desktop (which uses a Java-based browser component)—is of inferior quality for our primary use case: embedding https://github.com/copilot/agents and monitoring/interacting with CoPilot Agent progress, then reporting notifications to the user. This is critical to our real-time agent UI/notification requirements. There are performance, compatibility, and extensibility issues compared to alternatives.

Context

  • On 2025-12-11, we decided to move forward with Kotlin Multi Platform (KMP) for Codeoba, largely based on PR Add comprehensive cross-platform framework evaluation with Codeoba-specific requirements #3 and the original framework evaluation.
  • 12 days post-decision, major limitations with KMP’s embedded webview became evident: the Java browser component does not work well with modern/complex websites like copilot/agents.
  • A robust, extensible embedded web browser is key for Codeoba, for real-time interaction, programmatic DOM inspection & notification handling.

Questions to Revisit

  • Is KMP’s WebView sufficient for our needs, or is it a blocker for full-featured agent UI/notification integration?
  • Is Qt (with its modern QtWebEngine) a better fit for this requirement, or does it have significant tradeoffs?
  • How do other cross-platform frameworks considered in PR Add comprehensive cross-platform framework evaluation with Codeoba-specific requirements #3 (see docs/FRAMEWORK_EVALUATION.md) fare in this area specifically?
    • Flutter
    • React Native
    • Electron
    • .NET MAUI
    • Others?
  • What is the recommended path forward if KMP’s WebView is a non-starter?

Acceptance Criteria

  • Documented review of KMP’s current WebView support and limitations for our use case
  • Comparative matrix of embedded webview/browser capability for all major candidate frameworks
  • Clear recommendation (stay or pivot), with rationale
  • Linked supporting evidence/discussion
  • Proposed mitigation plan if pivot required

Related Documentation


This issue replaces the previously settled framework decision, in light of new technical blockers. Immediate investigation and discussion required.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits December 23, 2025 09:09
Co-authored-by: paulpv <1393897+paulpv@users.noreply.github.com>
Co-authored-by: paulpv <1393897+paulpv@users.noreply.github.com>
Copilot AI changed the title [WIP] Re-evaluate WebView solution for Codeoba WebView evaluation: Stay with KMP, implement CEF mitigation for Desktop Dec 23, 2025
Copilot AI requested a review from paulpv December 23, 2025 09:17
@paulpv paulpv marked this pull request as ready for review December 23, 2025 09:57
Copilot AI review requested due to automatic review settings December 23, 2025 09:57
@paulpv paulpv merged commit 5fa48a9 into main Dec 23, 2025
11 checks passed
@paulpv paulpv deleted the copilot/re-evaluate-webview-solution branch December 23, 2025 09:57
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR provides a comprehensive evaluation of WebView technology across cross-platform frameworks in response to Desktop WebView limitations discovered during PR #36. The analysis concludes that Codeoba should stay with Kotlin Multiplatform (KMP) and implement mitigation strategies rather than pivot to a different framework.

Key changes:

  • Added comprehensive WebView evaluation documenting KMP's bifurcated WebView support (excellent on Android, limited on Desktop)
  • Evaluated 11 alternative frameworks with detailed WebView capability comparison
  • Recommended JCEF (Java Chromium Embedded Framework) as primary mitigation strategy for Desktop

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
docs/WEBVIEW_EVALUATION.md Comprehensive 691-line analysis of WebView capabilities across frameworks, including technical assessment, comparative matrices, mitigation strategies, and decision rationale
docs/WEBVIEW_DECISION_SUMMARY.md Executive summary (176 lines) documenting acceptance criteria status, key findings, and recommended next steps for stakeholder review
docs/FRAMEWORK_EVALUATION.md Updated existing framework evaluation with WebView quality ratings column and cross-references to the new WebView evaluation
README.md Added links to the new WebView evaluation documentation in the documentation section

@@ -0,0 +1,176 @@
# WebView Technology Decision Summary

**Issue:** [Re-evaluate WebView solution for Codeoba](https://github.com/LookAtWhatAiCanDo/Codeoba/issues/XX)
Copy link

Copilot AI Dec 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue number placeholder "XX" should be replaced with the actual issue number. Based on the PR description, this should be issue #38.

Suggested change
**Issue:** [Re-evaluate WebView solution for Codeoba](https://github.com/LookAtWhatAiCanDo/Codeoba/issues/XX)
**Issue:** [Re-evaluate WebView solution for Codeoba](https://github.com/LookAtWhatAiCanDo/Codeoba/issues/38)

Copilot uses AI. Check for mistakes.

- **Original Framework Decision:** PR #3 (December 11, 2025)
- **Agent Tab Implementation:** PR #36 (December 23, 2025)
- **Issue:** [Re-evaluate WebView solution for Codeoba](https://github.com/LookAtWhatAiCanDo/Codeoba/issues/XX)
Copy link

Copilot AI Dec 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue number placeholder "XX" should be replaced with the actual issue number. Based on the PR description, this should be issue #38.

Copilot uses AI. Check for mistakes.

## Supporting Documentation

- **[WEBVIEW_EVALUATION.md](WEBVIEW_EVALUATION.md)** - Comprehensive evaluation (1300+ lines)
Copy link

Copilot AI Dec 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent line count stated. The summary mentions "691 lines" but the document states "1300+ lines" in the summary text. The actual line count is 691, so the reference on line 131 should say "691 lines" instead of "1300+ lines".

Suggested change
- **[WEBVIEW_EVALUATION.md](WEBVIEW_EVALUATION.md)** - Comprehensive evaluation (1300+ lines)
- **[WEBVIEW_EVALUATION.md](WEBVIEW_EVALUATION.md)** - Comprehensive evaluation (691 lines)

Copilot uses AI. Check for mistakes.
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.

Re-evaluate WebView solution for Codeoba: Is Kotlin Multi Platform's WebView viable, or should we pivot to Qt/other frameworks?

3 participants