<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[TechsOne Engineering]]></title><description><![CDATA[TechsOne Engineering]]></description><link>https://techsone.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Fri, 30 Oct 2026 09:10:16 GMT</lastBuildDate><atom:link href="https://techsone.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[I Built ComposeBridge: Real-Time Jetpack Compose UI Tweaks via AST & MCP
]]></title><description><![CDATA[Edit Jetpack Compose UI parameters live on Android devices with AST Kotlin synchronization and local MCP support.]]></description><link>https://techsone.hashnode.dev/i-built-composebridge-real-time-jetpack-compose-ui-tweaks-via-ast-mcp</link><guid isPermaLink="true">https://techsone.hashnode.dev/i-built-composebridge-real-time-jetpack-compose-ui-tweaks-via-ast-mcp</guid><category><![CDATA[Android]]></category><category><![CDATA[Kotlin]]></category><category><![CDATA[Kotlin Multiplatform]]></category><category><![CDATA[Jetpack Compose]]></category><dc:creator><![CDATA[GALAL ALDEEN  ABAS]]></dc:creator><pubDate>Thu, 22 Oct 2026 02:51:09 GMT</pubDate><content:encoded><![CDATA[<p>If you develop Android apps with Jetpack Compose, you are likely familiar with iteration fatigue: tweaking a padding from <code>8.dp</code> to <code>16.dp</code> or adjusting a color shade, only to wait 20 to 40 seconds for Gradle to rebuild and re-deploy.</p>
<p>While IDE previews have improved, they often lag, consume excessive memory, or fail to accurately represent the layout on actual physical hardware.</p>
<p>To solve this friction in my daily workflow, I built <strong>ComposeBridge</strong>—an open-source JetBrains IDE plugin that enables real-time visual UI tweaks directly on running devices and writes the modifications back to Kotlin source files.</p>
<hr />
<h3>How ComposeBridge Works Under the Hood</h3>
<p>The architecture relies on three primary pillars:</p>
<h4>1. On-Device Parameter Inspection</h4>
<p>During runtime composition, UI nodes retain source metadata (source file paths, line/column coordinates, and composable signatures) leveraging internal Compose tags. When an element is selected on the screen, these coordinates are sent back to the IDE over a lightweight WebSocket connection.</p>
<h4>2. AST / PSI Code Mutations (No Fragile Regex)</h4>
<p>Naive text replacement or regex easily breaks Kotlin code when formatting changes. Instead, ComposeBridge leverages IntelliJ's <strong>PSI (Program Structure Interface)</strong>:</p>
<ul>
<li><p>It maps the incoming coordinates to the exact AST node in the Kotlin file.</p>
</li>
<li><p>It safely rewrites only the specific argument (e.g., <code>padding</code>, <code>backgroundColor</code>, or <code>fontSize</code>).</p>
</li>
<li><p>It tracks file mutations in real time, providing visual diffs and single-click rollbacks directly within Android Studio.</p>
</li>
</ul>
<h4>3. Model Context Protocol (MCP) Integration</h4>
<p>ComposeBridge includes a local <strong>MCP server</strong> that exposes the live Compose UI hierarchy. This allows local AI coding agents (such as Claude Code, Cursor, or custom IDE agents) to inspect the actual UI state on the running device and propose layout patches based on real runtime context rather than static source code guessing.</p>
<hr />
<h3>Getting Started</h3>
<p>ComposeBridge is fully open-source and officially verified on the JetBrains Marketplace:</p>
<ul>
<li><p><strong>JetBrains Marketplace:</strong> <a href="https://plugins.jetbrains.com/plugin/35226-composebridge">Install ComposeBridge</a></p>
</li>
<li><p><strong>GitHub Repository:</strong> <a href="https://github.com/JALAL591/compose-bridge">JALAL591/compose-bridge</a></p>
</li>
</ul>
<p>Contributions, architectural feedback, and bug reports are welcome. If you test it out on your projects, feel free to share your thoughts in the comments!</p>
]]></content:encoded></item></channel></rss>