Conversation
feature/consistent-viewstatestring-usage
feature/consistent-viewstatestring-usage
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new guidance is ambiguous and conflicts with existing screen-generation instructions.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This PR clarifies when ViewStateString should be used in ViewModels and UI code.
Changes:
- Adds usage guidance to
ViewStateStringdocumentation. - Updates
AGENTS.MDwith the new guideline.
File summaries
| File | Description |
|---|---|
core/ui/.../ViewStateString.kt |
Documents deferred string resolution guidance. |
AGENTS.MD |
Updates agent guidance for ViewStateString usage. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
feature/consistent-viewstatestring-usage
feature/consistent-viewstatestring-usage
ninovanhooff
approved these changes
Sep 18, 2026
tom0334
enabled auto-merge
September 18, 2026 15:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why is this important?
To clarify our usage of viewStateString. This makes agents (and our colleages) use ViewStateString more consistently. Basically: only when needed. Resolve it to a basic string when possible.
Notes
I couldn't find cases in the template were the usage of viewStateString didn't correspond with our guidelines yet.
The only cases where it wasn't unwrapped at the highest level possible, were when it was part of a viewstate. Which we consider to be OK.
(Some previews create create ViewStateString.basic as well, because the composables they preview take a viewstate that has a viewstateString in them as param. Which I think is OK!