Repository navigation
fix(calculator): show all four number bases and add copy actions - #1128
Conversation
Explicit base conversions (e.g. `0b101 in hex`) previously reused
`all_bases_detail()`, which omitted decimal and duplicated the target
base in the expression subtitle.
- Replace `all_bases_detail` with `other_bases_detail` in `extras.rs` so
the subtitle always shows the other three bases among dec/bin/oct/hex.
- Attach `baseFormats` to base results in `CalculatorExtension` and
expose `calculator:copy-base-{dec,bin,oct,hex}` actions in `⌘K`,
matching the existing `colorFormats` pattern.
- Add `selection_actions.copy_base_as_desc` across all 5 locale files
and unit tests covering both Rust evaluation and `rowActions`.
|
No actionable comments were generated in the recent review. WalkthroughBase conversion results now share formatting logic and list the other three bases. Calculator search results expose copy actions for recognized decimal, binary, octal, and hexadecimal values. Tests cover conversion details, available actions, and clipboard output. ChangesCalculator base formats
Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Possibly related PRs
Suggested labels: Suggested reviewers: Merge Risk:
|
Explicit base conversions (e.g.
0b101 in hex) previously reusedall_bases_detail(), which omitted decimal and duplicated the targetbase in the expression subtitle.
all_bases_detailwithother_bases_detailinextras.rssothe subtitle always shows the other three bases among dec/bin/oct/hex.
baseFormatsto base results inCalculatorExtensionandexpose
calculator:copy-base-{dec,bin,oct,hex}actions in⌘K,matching the existing
colorFormatspattern.selection_actions.copy_base_as_descacross all 5 locale filesand unit tests covering both Rust evaluation and
rowActions.What changed
Affected areas
asyar-sdk, extension runtime, IPC contracts, manifest)Manual smoke test & Validation
pnpm dev) and visually verified the fix/feature works.AI usage
asyar-contributionskill (.agents/skills/asyar-contribution/SKILL.md), followed it, and reviewed every generated line.Boundaries
pnpm check:ci(or the relevant inner-loop checks) passes locally.Summary by CodeRabbit