Files
onyx/web/lib
roshan ae4ca216e9 feat(sidebar): tag Decision Models and Craft as Beta (#16440)
## Description

Adds a small blue **Beta** tag to Decision Models and Craft:

- **Admin sidebar, Decision Models:** the tag sits flush right on the
row (`SidebarTab` `rightChildren`).
- **Admin sidebar, Craft:** the tag sits flush right on the Craft
section heading, in the same column as the Decision Models tag. Access
and Preferences do not each get a tag.
- **App sidebar (`/app`), Craft row:** shows Beta when Craft is
available. The upsell state still shows only Business, so the row never
shows two tags.

Changes:

- `AdminRouteEntry` gets an optional `beta` flag. `DECISION_MODELS` sets
it, and `buildItems` copies it onto `SidebarItemEntry`.
- `BETA_SECTION_IDS` in `admin-sidebar-utils.ts` lists the sections with
a Beta heading (`craft`).
- Opal `SidebarLayouts.Section` gets an optional `tag?: TagProps`,
rendered at the end of the header (`.opal-sidebar-section__tag`),
aligned with tab `rightChildren`.
- Opal `SidebarTab`: `.opal-sidebar-tab__actions` no longer catches
clicks itself. Its direct children still do, except a passive `Tag` (no
`onClick`/`onRemove`), so a click on a passive tag opens the row link.
- New strings `sidebar.adminSidebar.betaTag.label` and
`sidebar.appSidebar.craft.betaTag` in all 9 locales.

Stacked on #16284.

## How Has This Been Tested?

- Jest: `admin-sidebar-utils.test.ts` checks that only Decision Models
is a beta entry; i18n catalog tests pass.
- Pre-commit: type check and coverage, oxfmt, oxlint, i18n copy check.
- UI at `898de231a3`, desktop 1440×1000 and mobile 390×844:
- The admin Decision Models and Craft heading tags have the same right
edge (216 px) and size (32×16 px) on both viewports.
- A click on the center of the Decision Models Beta tag opens
`/admin/decision-models`. A click on the `/app` Craft Beta tag opens the
Craft link (`GET /craft/v1`).
- `/app` shows only Beta when Craft is available, and only Business in
the upsell state.
- Regression: the chat-session `…` button in `rightChildren` still opens
its menu and does not navigate.
- Craft availability and tier were mocked locally in the browser
settings response, because the test workspace is Community tier. Real
Craft entitlement and the licensed Craft page were not tested.

Left: desktop. Right: mobile (390×844).

**Admin sidebar**

![Admin tag
alignment](https://app.devin.ai/api/presigned_proxy?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjpudWxsLCJidWNrZXRfbmFtZSI6ImRldmluYXR0YWNobWVudHMiLCJidWNrZXRfa2V5IjoiYXR0YWNobWVudHNfcHJpdmF0ZS9vcmdfT2NlNnlnR2RrdGJQekZsaS9iYTE5OThjZC02NmIzLTRiYTYtOTlmOC0yNTFkNGFmODM0OTEiLCJpYXQiOjE3OTI2MjY0NDAsIm9yZ19pZCI6Im9yZ19PY2U2eWdHZGt0YlB6RmxpIiwiZmlsZW5hbWUiOiJhZG1pbi1kZXNrdG9wLW1vYmlsZS5wbmcifQ.Mu5AWH20PifDbVH_ZErd5bwKLnQ0aXXsUPo76FS7FQA)

**`/app` Craft row**

| Craft available | Upgrade required |
|---|---|
| ![Craft
Beta](https://app.devin.ai/api/presigned_proxy?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjpudWxsLCJidWNrZXRfbmFtZSI6ImRldmluYXR0YWNobWVudHMiLCJidWNrZXRfa2V5IjoiYXR0YWNobWVudHNfcHJpdmF0ZS9vcmdfT2NlNnlnR2RrdGJQekZsaS80MjA5MTkwOC03MGJjLTQzOGQtYjUyZS1hYjczZjMzM2JlYzgiLCJpYXQiOjE3OTI2MjY0NDAsIm9yZ19pZCI6Im9yZ19PY2U2eWdHZGt0YlB6RmxpIiwiZmlsZW5hbWUiOiJhcHAtYmV0YS1kZXNrdG9wLW1vYmlsZS5wbmcifQ.PPpDOLhL4ZoWOXNLvL2b_ibuuy53Cz4J9naVY-bJJ-M)
| ![Craft
Business](https://app.devin.ai/api/presigned_proxy?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjpudWxsLCJidWNrZXRfbmFtZSI6ImRldmluYXR0YWNobWVudHMiLCJidWNrZXRfa2V5IjoiYXR0YWNobWVudHNfcHJpdmF0ZS9vcmdfT2NlNnlnR2RrdGJQekZsaS82MmY0OGNmNS0wZjRlLTQ3MTAtYTBhMS0yOTdjZDEzMmE0OWIiLCJpYXQiOjE3OTI2MjY0NDAsIm9yZ19pZCI6Im9yZ19PY2U2eWdHZGt0YlB6RmxpIiwiZmlsZW5hbWUiOiJhcHAtdXBzZWxsLWRlc2t0b3AtbW9iaWxlLnBuZyJ9.6nShf5pkKpT8QRiYsYU9guSScPRktZYizcmWEqVLwB8)
|

**Tag clicks and chat-menu regression**

![Tag
clicks](https://app.devin.ai/api/presigned_proxy?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjpudWxsLCJidWNrZXRfbmFtZSI6ImRldmluYXR0YWNobWVudHMiLCJidWNrZXRfa2V5IjoiYXR0YWNobWVudHNfcHJpdmF0ZS9vcmdfT2NlNnlnR2RrdGJQekZsaS9jMjFmOTQ3Ni0yNzU2LTRhYTUtODRlZi1iMTNlZGFiNjc3MzgiLCJpYXQiOjE3OTI2MjY0NDAsIm9yZ19pZCI6Im9yZ19PY2U2eWdHZGt0YlB6RmxpIiwiZmlsZW5hbWUiOiJzaWRlYmFyLXRhZy1jbGlja3Mud2VicCJ9.f3txb6_u_GjmCAbQj3dLjnDNP0eBOyzoZS_b46Zo5jU)

![Chat menu still
opens](https://app.devin.ai/api/presigned_proxy?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjpudWxsLCJidWNrZXRfbmFtZSI6ImRldmluYXR0YWNobWVudHMiLCJidWNrZXRfa2V5IjoiYXR0YWNobWVudHNfcHJpdmF0ZS9vcmdfT2NlNnlnR2RrdGJQekZsaS8zY2U0MDQ2ZS0wOWQxLTRmMzQtYTIxYS0wNzA1YjhmMTVhODUiLCJpYXQiOjE3OTI2MjY0NDAsIm9yZ19pZCI6Im9yZ19PY2U2eWdHZGt0YlB6RmxpIiwiZmlsZW5hbWUiOiJyZWdyZXNzaW9uLWNoYXQtbWVudS1sYWJlbGVkLnBuZyJ9.9L02NeKFBESHzkgtyzBCdC2nL6joFH6_62xR72D9v8s)

## Additional Options

- [ ] [Optional] Please cherry-pick this PR to the latest release
version.

Link to Devin session:
https://app.devin.ai/sessions/39d77bde91c34b75922bb05c02b93b90
Open in Devin Desktop:
https://app.devin.ai/desktop/session/39d77bde91c34b75922bb05c02b93b90?variant=devin
Requested by: @rohoswagger

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

- **New Features**
- Added Beta labels to relevant admin sidebar sections and items,
including Decision Models.
- Added Beta labeling to the Craft sidebar entry alongside its existing
Business label.
  - Added support for optional tags in sidebar section headers.
  - Localized new Beta labels across supported languages.
- **Bug Fixes**
- Sidebar tags no longer block clicks on their underlying navigation
items.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-22 01:02:09 +00:00
..