ANTIGRAVITY LABJP
ARTICLES

All Articles

All (953) Antigravity Basics (143) Editor View (62) Agents & Manager (248) Integrations (126) App Development (216) AI Tools (63) Tips & Best Practices (95)
App Development/2026-06-23Advanced

When Only the Japanese Turns to Tofu in Your Share Image — Fixing next/og CJK Fonts with Antigravity

In next/og's ImageResponse, the Japanese title renders as empty boxes while English looks fine. Here is the real cause (Satori cannot read woff2), a complete edge implementation that pulls a TrueType subset via Google Fonts css2?text=, and how to get Antigravity to fix it the first time.

Antigravity Basics/2026-06-23Advanced

When the Default Model Changes Underneath You: Pinning and Diff-Gating Scheduled Runs

Antigravity 2.0 promoted Gemini 3.5 Flash to the default fast model. It is a welcome upgrade, but any scheduled run that leaned on the default starts producing subtly different output one morning. Here is how I pin the model explicitly, fingerprint the output, and gate drift, sized for a solo developer's pipeline.

App Development/2026-06-23Advanced

Only Slow Right After Install — Cutting Android Cold-Start Time with Baseline Profiles, Measured

Why an Android app stutters on launch only right after install or update, explained through JIT and Cloud Profiles, plus a measured walkthrough of cutting cold-start time with Baseline Profiles — from building a Macrobenchmark harness to staged rollout, from an indie developer's perspective.

Editor View/2026-06-22Intermediate

Precedence for Nested AGENTS.md: A Merge Design for Many Projects in One Workspace

Put several projects in one workspace, each with its own AGENTS.md, and which instruction the agent follows turns ambiguous. Root and per-project rules quietly collide; one wins, or both blend. Taking 'closer is stronger' as the base rule, this designs a merge that distinguishes overriding from appending, with working Python and field notes.

Tips & Best Practices/2026-06-22Advanced

Strip Secrets Out of the Agent Logs You Keep: Designing a Redaction Layer

Once you start keeping logs from unattended agents, a token or API key eventually lands in them in plaintext. Rotating the key doesn't unmake the leaked log. This designs a redaction layer that reliably drops secrets right before the write, going beyond regex to register known secrets and mask them for certain, with working Python and field notes.

Integrations/2026-06-22Advanced

Scope the MCP Tools You Hand an Agent: A Least-Privilege Allowlist Design

As you add MCP servers to Antigravity 2.0, the set of tools every agent can reach quietly grows into an all-you-can-eat buffet. An agent that only needs to read files seeing delete and deploy tools is an accident waiting to happen. This walks through a least-privilege design that scopes tools per agent role, denies at call time, and gates destructive operations behind a second step, with working Python and field notes.

App Development/2026-06-22Advanced

It Only Crashes in Release — Tracking Down When R8 Full Mode Broke My Gson Mapping

It works in debug but crashes only in release. This walks through the R8 full-mode pattern that breaks Gson reflection, how to reproduce it locally, deobfuscate the stack trace, and write the smallest keep rules that fix it.

App Development/2026-06-22Intermediate

Letting Users Switch the App's Language Without Touching Their Device Language — Notes on Android Per-App Language

How to implement in-app language switching on Android with AppCompatDelegate.setApplicationLocales and locales_config, plus the gotchas around pre-API-33 compatibility, activity recreation, and AdMob, from an implementation point of view.

App Development/2026-06-22Advanced

Porting a Wallpaper Viewer's Slideshow and Page-Scrubber from iOS to Android — Where the Two-Way Sync with SnapHelper Tripped Me Up

A hands-on record of porting a full-screen wallpaper viewer's slideshow and bottom scrubber from iOS to Android. How I pinned down the current page with RecyclerView and SnapHelper, synced it two-way with the scrubber, and resolved the conflict between auto-advance and user input with a small state machine — in working Kotlin.

Agents & Manager/2026-06-22Advanced

Your Antigravity Custom Tools Don't Break by Design — They Break on Re-execution: Field Notes on Idempotency and Error Contracts

Once you add a custom tool to an Antigravity agent, the real production problem is re-execution and duplicated side effects. Here are the idempotency keys, error contracts, health gates, and tool-sprawl checks that actually held up in practice.

Agents & Manager/2026-06-22Advanced

Stop Hard-Coding Your Agent Concurrency: Let It Tune Itself From What It Observes

When you run several Antigravity 2.0 agents in parallel, a single fixed concurrency number is wrong twice: it stalls at 429s during the day and idles capacity at night. Here is an adaptive design borrowed from TCP congestion control — additive increase, multiplicative decrease — that moves your concurrency from observed signals, with working Python and field notes.

App Development/2026-06-21Advanced

The Back Button Showed an Interstitial Sometimes, Not Others — Rewriting Nested ifs Into a List of Independent Guards

Interstitial display on back press was unstable because nested if statements hid the priority between conditions. Here is how I split it into reason-returning guards and generated tests from a decision table.