Add native input footer plugin point with high-usage model notice - #9816
YoussefKeyrouz wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
4900449 to
b31bd9c
Compare
|
@claude review |
There was a problem hiding this comment.
Beyond the inline finding, I checked two other spots in this PR for similar failure modes and ruled them out for this PR (though worth watching for the two follow-up plugins mentioned in the description): NativeInputFooterDockLayout's elevation-sync (syncFooterElevation) only keeps shadow continuity for footers whose root view is a MaterialCardView — fine for HighUsageModelFooterView today, but silently a no-op for a differently-rooted future footer. And in HighUsageModelFooterPlugin, the in-memory locallyDismissedModelIds resets each time createFooter runs while the persisted write happens on appCoroutineScope asynchronously, so a very fast dismiss-then-reopen could show the notice again before the store catches up — a narrow, self-healing race rather than a correctness bug.
Extended reasoning...
This run's confirmed finding (missing .catch on HighUsageModelNoticeDismissalStore.dismissedModelIds, which per androidx DataStore's documented contract emits an IOException instead of a value on read failure) was verified directly in the file and is significant enough that a top-level approval isn't appropriate; it is already queued as an inline comment so it isn't restated here. Given a prior review already exists on an earlier version of this PR and the instructions call for staying silent unless something new and non-redundant is being added, I limited this message to the narrow "ruled out" exception: two additional code paths — the dock layout's MaterialCardView-only elevation sync and the dismiss/reopen timing in HighUsageModelFooterPlugin — were read and confirmed as real but non-blocking for this PR's scope (single plugin, best-effort race), which is new information not visible elsewhere in the thread. No other privacy, lateinit, or architecture-convention violations were found in the reviewed files beyond what's already flagged.
b31bd9c to
ec3ff8a
Compare
ec3ff8a to
4f58be7
Compare

Task/Issue URL: https://app.asana.com/1/137249556945/project/72649045549333/task/1216355756234757?focus=true
Tech Design URL (if applicable): https://app.asana.com/1/137249556945/project/72649045549333/task/1218250488028912?focus=true
API Proposals URL(s) (if applicable):
Description
Stacked PR 1
In this one I introduce the infrastructure for the footer and I use it for an easy use case: hard coded high model usage, just for visual testing.
Adds an internal plugin point for footers under the native Duck.ai input, and ships the first plugin: an informational notice shown while a high-usage model (Opus 4.8, hardcoded for now) is selected. The footer host is mounted below the input card on every native-input surface (top/bottom address bar, contextual sheet, contextual webview, contextual entry dialog). Only the highest-priority visible footer is rendered. Dismissal is persisted per model.
Everything is behind the
duckAiUsageWarningsflag, default off. Usage-limit notices come in a later PR.Steps to test this PR
Setup
duckAiUsageWarningsin Feature Flag Inventory, and make sure native chat input is enabledAddress bar, Duck.ai mode
Model switching
Contextual Duck.ai
Edit prompt
Flag off
duckAiUsageWarnings: no notice anywhere, input cards look exactly as ondevelopDismiss
UI changes