Skip to content

fix: restore V2 composer translation callback - #929

Merged
jack-champagne merged 1 commit into
mainfrom
fix/v2-composer-placeholder
Sep 9, 2026
Merged

fix: restore V2 composer translation callback#929
jack-champagne merged 1 commit into
mainfrom
fix/v2-composer-placeholder

Conversation

@jack-champagne

@jack-champagne jack-champagne commented Sep 9, 2026

Copy link
Copy Markdown
Member

Summary: restore the translator callback required by the V2 composer placeholder helper and refresh the overlay manifest. Verification: materialized app build and upstream placeholder contract test.

Summary by CodeRabbit

  • Bug Fixes

    • Improved prompt input placeholder translations by ensuring dynamic translation parameters are applied correctly.
  • Chores

    • Refreshed application bundle metadata and content verification information.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 7a20243d-9322-4696-ad08-e6ac1f6d9139

📥 Commits

Reviewing files that changed from the base of the PR and between 2b5a779 and 5f09760.

📒 Files selected for processing (2)
  • packages/app-bundle/manifest.json
  • packages/app-bundle/overlay/packages/app/src/components/prompt-input-v2.tsx

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The prompt input now forwards placeholder translation requests to language.t. The app-bundle manifest updates its extraction timestamp and the recorded hash for the changed file.

Changes

Prompt placeholder update

Layer / File(s) Summary
Translation callback and bundle metadata
packages/app-bundle/overlay/.../prompt-input-v2.tsx, packages/app-bundle/manifest.json
designPlaceholder passes a translation callback to promptDesignPlaceholder. The manifest records the updated extraction timestamp and file hash.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 5f097

V2 composer placeholders again use the active language service for translations, with matching bundle metadata. No merge-blocking risk is identified.

Suggested reviewers: aarontrowbridge, jeonghun-jj-lee

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description states the change and verification performed, but it does not include the required Related Issue, Description, Type of Change, Verification checkboxes, and Manual Testing Notes section… Add the required template sections. Link the related GitHub issue with Closes #<issue-number>, select the applicable change type, record the required verification results, and describe the manual testing performed.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: restoring the V2 composer translation callback.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description states the change and verification performed, but it does not include the required Related Issue, Description, Type of Change, Verification checkboxes, and Manual Testing Notes sections.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/v2-composer-placeholder

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jack-champagne
jack-champagne merged commit 59b447e into main Sep 9, 2026
10 checks passed
aarontrowbridge added a commit that referenced this pull request Sep 10, 2026
Sync-reconciliation: restore #929's translate-callback fix + the pre-sync guard (#964)
jeonghun-jj-lee added a commit that referenced this pull request Sep 12, 2026
The overlay sync in earlier commits wiped amicode-side patches (#929, #832,
#987, OAuth bridge, titlebar interactions) because the fork's local/amicode
branch doesn't carry them yet. Restore the full overlay from main; the
proper sync happens after the fork PR merges into local/amicode.
jeonghun-jj-lee added a commit that referenced this pull request Sep 12, 2026
…) (#1028)

* feat(#1026): Slice 1 — VS Code theme extraction + bridge

Add syntax_theme_bridge.ts: resolves the active VS Code color theme to
either a Shiki built-in name (fast path, ~30 popular themes) or a full
TextMate theme object extracted from the contributing extension's
filesystem. Handles include chains (max depth 5, cycle detection) and
merges editor.tokenColorCustomizations user overrides.

Wire into ChatPanel: postSyntaxTheme() fires on theme change, on
workbench.colorTheme change, and on tokenColorCustomizations change.
Add 'syntax-theme' to both Lane 2 relay allowlists so the message
reaches the framed app.

8 tests covering: built-in matching, custom extraction, include chains,
cycle detection, user override merging, and fallback behavior.

* chore: sync overlay to opencode a9c4bc736a (Shiki syntax highlighting, #1026)

Overlay promotion from opencode fork branch with Slices 2-5:
- shiki-theme-state.ts: reactive theme state for the webview
- shiki-highlight-worker.ts: dedicated Shiki tokenization Web Worker
- shiki-highlight-plugin.ts: CM6 ViewPlugin with Shiki decorations
- editor-core.ts: wired Shiki extension + language-data fallback
- preview-editor.tsx + editable-diff-view: pass lang to baseExtensions
- markdown-shiki.worker.ts: theme-update support
- pierre/worker.ts: active theme for @pierre/diffs pools
- app.tsx: syntax-theme message handler

Plus opencode fork upstream changes included in the full promotion.

* fix(#1026): correct Shiki decoration bugs + sync overlay

Three bugs fixed in the fork:
1. Empty fallback theme: worker init now uses the actual OpenCodeTheme
   (30+ TextMate scope rules) instead of an empty stub
2. Worker URL: uses Vite ?worker&url import pattern matching existing
   markdown-shiki and @pierre/diffs workers
3. Test compat: extracted pure decoration logic to shiki-highlight-
   decorations.ts; editor-core.ts lazy-imports the plugin module

New integration test verifies Shiki produces colored tokens + valid
CM6 decorations for Julia, TypeScript, Python, Rust, Go, YAML, and
Shell (16 tests, all green).

* chore: clean overlay sync from correct upstream base (afc0f1c26a vs 6fa55b660a)

Previous incremental syncs used intermediate fork commits as the base,
causing new Shiki files to be missing from the overlay. Redo as a
full fork-vs-upstream-base delta to get all 18 files correctly.

Fixes: shiki-highlight-plugin.ts, shiki-highlight-worker.ts,
shiki-highlight-decorations.ts, shiki-theme-state.ts and tests now
present in the overlay. The binary was already built from the correct
fork commit (afc0f1c26a) — this fixes only the overlay tracking copy.

* fix(#1026): deliver VS Code syntax theme after iframe boot

The extension previously posted syntax-theme only after a later VS Code
theme/configuration change. A newly opened Preview tab therefore stayed
on the OpenCode fallback palette forever.

Post the resolved syntax theme on the existing app-ready handshake,
when the iframe listener is guaranteed to exist. Restore live refreshes
for colorTheme and tokenColorCustomizations changes, and admit the
message through both Lane 2 relay render paths.

Add regression coverage proving a fresh panel receives dark-plus after
app-ready and both relays contain syntax-theme.

* chore: restore overlay from main — sync deferred to post-fork-merge

The overlay sync in earlier commits wiped amicode-side patches (#929, #832,
#987, OAuth bridge, titlebar interactions) because the fork's local/amicode
branch doesn't carry them yet. Restore the full overlay from main; the
proper sync happens after the fork PR merges into local/amicode.

* chore: restore app-bundle manifest from main

The sync:apply rewrote the manifest to point at the Shiki feature branch
(afc0f1c26a) instead of local/amicode. Restore main's manifest so the
drift gate passes against local/amicode as-is.

* chore: remove leftover Shiki overlay files — overlay now matches main exactly
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.

1 participant