Repository navigation
perf(shared): strip plan prefixes in linear time - #28537
Approved
- Eligibility
- Correctness
Note
More information about how approvability works can be found in our Help Center.
Details
Eligibility
This refactor makes plan-prefix stripping linear-time while preserving the existing display and search behavior. It introduces no product-default changes, persistent-data changes, or static-analysis suppressions.
Additional Thinking
Your Custom Policy
Default approvability criteria apply. Neither additional human-review condition is triggered: the change alters no product defaults and adds or broadens no static-analysis suppression.
Code
Replaces repeated array shifts with an advancing index and one final slice when stripping plan headings and blank prefixes. Callers use the result for web/mobile plan display, collapsed previews, and searchable plan text. This is an in-memory performance refactor without persistence or external-system changes.
Review Context
Author is hieu-lee; no ownership information was supplied. There are no unresolved review comments or supplied correctness findings, blocking-severity configuration, or check results. The supplied diff and inspected callers establish the limited presentation/search scope.
Verdict
The understood change preserves the existing prefix-stripping policy while avoiding repeated array compaction. Its effects are limited to derived display and search strings, with no obvious material risk requiring human judgment.
Notes:
No code owners found in target merge base 7195b69
Agent Credits: 30 credits
Approvability runs at a flat rate of 30 credits whenever the agent is asked for a verdict.