<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ux on ICE-ICE-BEAR-BLOG</title><link>https://ice-ice-bear.github.io/tags/ux/</link><description>Recent content in Ux on ICE-ICE-BEAR-BLOG</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Wed, 08 Apr 2026 00:00:00 +0900</lastBuildDate><atom:link href="https://ice-ice-bear.github.io/tags/ux/index.xml" rel="self" type="application/rss+xml"/><item><title>Hybrid Image Search Dev Log #11 — Tone/Angle Injection UX and EC2 Deployment</title><link>https://ice-ice-bear.github.io/posts/2026-04-08-hybrid-search-dev11/</link><pubDate>Wed, 08 Apr 2026 00:00:00 +0900</pubDate><guid>https://ice-ice-bear.github.io/posts/2026-04-08-hybrid-search-dev11/</guid><description>&lt;img src="https://ice-ice-bear.github.io/" alt="Featured image of post Hybrid Image Search Dev Log #11 — Tone/Angle Injection UX and EC2 Deployment" /&gt;&lt;p&gt;In &lt;a class="link" href="https://ice-ice-bear.github.io/en/posts/2026-04-07-hybrid-search-dev10/" &gt;the previous post: Hybrid Image Search Dev Log #10&lt;/a&gt;, we built an OTel metrics dashboard and optimized pipeline performance. This time, we significantly improved the tone/angle injection UX, scaled up the EC2 instance, and wrote deployment automation scripts.&lt;/p&gt;
&lt;h2 id="commit-log-for-this-session"&gt;Commit Log for This Session
&lt;/h2&gt;&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th style="text-align: center"&gt;Order&lt;/th&gt;
 &lt;th style="text-align: center"&gt;Type&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td style="text-align: center"&gt;1&lt;/td&gt;
 &lt;td style="text-align: center"&gt;chore&lt;/td&gt;
 &lt;td&gt;Increase Gemini API timeout from 2 to 3 minutes&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: center"&gt;2&lt;/td&gt;
 &lt;td style="text-align: center"&gt;fix&lt;/td&gt;
 &lt;td&gt;Disable OTel exporters locally to avoid connection errors&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: center"&gt;3&lt;/td&gt;
 &lt;td style="text-align: center"&gt;feat&lt;/td&gt;
 &lt;td&gt;Allow category change in tone/angle injection regeneration&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: center"&gt;4&lt;/td&gt;
 &lt;td style="text-align: center"&gt;fix&lt;/td&gt;
 &lt;td&gt;Change EC2 instance type from t3.medium to m7g.2xlarge&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: center"&gt;5&lt;/td&gt;
 &lt;td style="text-align: center"&gt;feat&lt;/td&gt;
 &lt;td&gt;Add toggle to enable/disable tone/angle auto-injection&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: center"&gt;6&lt;/td&gt;
 &lt;td style="text-align: center"&gt;feat&lt;/td&gt;
 &lt;td&gt;Auto-set injection toggle to match original on regeneration&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: center"&gt;7&lt;/td&gt;
 &lt;td style="text-align: center"&gt;feat&lt;/td&gt;
 &lt;td&gt;Show ratio controls when adding injection to non-injected image&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: center"&gt;8&lt;/td&gt;
 &lt;td style="text-align: center"&gt;feat&lt;/td&gt;
 &lt;td&gt;Add EC2 setup and deploy scripts&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="background-two-parallel-tracks-toward-production"&gt;Background: Two Parallel Tracks Toward Production
&lt;/h2&gt;&lt;p&gt;After fixing performance bottlenecks in #10, two issues remained:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;UX problems&lt;/strong&gt; — the tone/angle injection feature existed but lacked flexibility: no category changes during regeneration, no toggle control&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Infrastructure problems&lt;/strong&gt; — t3.medium couldn&amp;rsquo;t handle the resource demands of the image generation pipeline, and deployments were manual&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This session tackled both in parallel.&lt;/p&gt;
&lt;h2 id="step-1-gemini-api-timeout-and-otel-local-error-fixes"&gt;Step 1: Gemini API Timeout and OTel Local Error Fixes
&lt;/h2&gt;&lt;h3 id="timeout-2-minutes-to-3-minutes"&gt;Timeout: 2 Minutes to 3 Minutes
&lt;/h3&gt;&lt;p&gt;In #10, we set a 2-minute timeout on Gemini API calls. In practice, complex image generation requests occasionally exceeded 2 minutes during legitimate processing. Cutting off a valid request wastes both API cost and user time, so we bumped it to 3 minutes.&lt;/p&gt;
&lt;h3 id="otel-local-connection-errors"&gt;OTel Local Connection Errors
&lt;/h3&gt;&lt;p&gt;The OTel exporters were attempting to connect to Grafana Cloud endpoints even in local development, flooding the console with connection errors. We added a conditional check to disable OTel exporters locally.&lt;/p&gt;
&lt;pre class="mermaid" style="visibility:hidden"&gt;flowchart LR
 Start["App Start"] --&gt; EnvCheck{"Env Variable &amp;lt;br/&amp;gt; OTEL_ENABLED?"}
 EnvCheck --&gt;|true| OTelInit["OTel SDK Init &amp;lt;br/&amp;gt; Traces + Metrics"]
 EnvCheck --&gt;|false| NoOp["OTel Disabled &amp;lt;br/&amp;gt; NoOp Exporter"]
 OTelInit --&gt; Grafana["Grafana Cloud"]
 NoOp --&gt; LocalDev["Local Dev &amp;lt;br/&amp;gt; Error-free"]&lt;/pre&gt;&lt;p&gt;A single environment variable now cleanly separates local and production OTel behavior.&lt;/p&gt;
&lt;h2 id="step-2-toneangle-injection-ux-improvements"&gt;Step 2: Tone/Angle Injection UX Improvements
&lt;/h2&gt;&lt;p&gt;The system has a feature that injects tone (color mood) and angle (perspective) into search results to generate new images. Previously, once generated, modifications were cumbersome. We made three UX improvements.&lt;/p&gt;
&lt;h3 id="category-change-during-regeneration"&gt;Category Change During Regeneration
&lt;/h3&gt;&lt;p&gt;Previously, when regenerating an image with injection applied, the original image&amp;rsquo;s category was locked. Users couldn&amp;rsquo;t explore &amp;ldquo;what if I regenerated this in a different category style?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;We enabled the category dropdown in regeneration mode, so users can keep the tone/angle settings while switching categories.&lt;/p&gt;
&lt;h3 id="injection-enabledisable-toggle"&gt;Injection Enable/Disable Toggle
&lt;/h3&gt;&lt;p&gt;Having tone/angle injection always automatically applied was sometimes inconvenient. We added a toggle switch so users can directly control whether injection is applied.&lt;/p&gt;
&lt;h3 id="auto-restore-toggle-state-on-regeneration"&gt;Auto-Restore Toggle State on Regeneration
&lt;/h3&gt;&lt;p&gt;When regenerating an injected image, if the toggle resets to its default (off), the result differs from the original. We now automatically restore the original image&amp;rsquo;s injection toggle state during regeneration.&lt;/p&gt;
&lt;h3 id="ratio-controls-for-adding-injection"&gt;Ratio Controls for Adding Injection
&lt;/h3&gt;&lt;p&gt;When a user wanted to add injection to a previously non-injected image, the ratio slider wasn&amp;rsquo;t appearing. We fixed this so that turning on the injection toggle also reveals the ratio controls.&lt;/p&gt;
&lt;h2 id="step-3-ec2-scale-up-and-deployment-automation"&gt;Step 3: EC2 Scale-Up and Deployment Automation
&lt;/h2&gt;&lt;h3 id="t3medium-to-m7g2xlarge"&gt;t3.medium to m7g.2xlarge
&lt;/h3&gt;&lt;p&gt;Based on the resource usage data from #10, we changed the instance type.&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Spec&lt;/th&gt;
 &lt;th&gt;t3.medium&lt;/th&gt;
 &lt;th&gt;m7g.2xlarge&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;vCPU&lt;/td&gt;
 &lt;td&gt;2&lt;/td&gt;
 &lt;td&gt;8&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;RAM&lt;/td&gt;
 &lt;td&gt;4 GB&lt;/td&gt;
 &lt;td&gt;32 GB&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Architecture&lt;/td&gt;
 &lt;td&gt;x86_64&lt;/td&gt;
 &lt;td&gt;ARM (Graviton3)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Cost Efficiency&lt;/td&gt;
 &lt;td&gt;General purpose&lt;/td&gt;
 &lt;td&gt;Better price-performance with ARM&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Graviton3-based m7g instances offer superior price-performance compared to x86, and Python workload compatibility is well-established. Given that the image generation pipeline is CPU/RAM-intensive, we ensured ample headroom.&lt;/p&gt;
&lt;h3 id="ec2-setup-and-deploy-scripts"&gt;EC2 Setup and Deploy Scripts
&lt;/h3&gt;&lt;p&gt;We automated the previously manual SSH-and-configure process with scripts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Setup script&lt;/strong&gt; — installs Python, system packages, configures virtual environment, sets environment variables&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Deploy script&lt;/strong&gt; — pulls latest code, updates dependencies, restarts services&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With these scripts, spinning up a new instance is a quick environment clone, and code deployments are a single command.&lt;/p&gt;
&lt;h2 id="summary"&gt;Summary
&lt;/h2&gt;&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Topic&lt;/th&gt;
 &lt;th&gt;Summary&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Gemini Timeout&lt;/td&gt;
 &lt;td&gt;Adjusted from 2 to 3 minutes to prevent premature cutoffs&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;OTel Local Errors&lt;/td&gt;
 &lt;td&gt;Environment-variable-based OTel exporter disable for local dev&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Injection UX&lt;/td&gt;
 &lt;td&gt;Category change, toggle, state restoration, ratio controls&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;EC2 Scale-Up&lt;/td&gt;
 &lt;td&gt;t3.medium to m7g.2xlarge (Graviton3, 8 vCPU, 32 GB)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Deployment Automation&lt;/td&gt;
 &lt;td&gt;EC2 setup and deploy scripts added&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;</description></item></channel></rss>