diff --git a/.changeset/37227-home-drop-build-entries.md b/.changeset/37227-home-drop-build-entries.md
new file mode 100644
index 00000000000..46db76f4149
--- /dev/null
+++ b/.changeset/37227-home-drop-build-entries.md
@@ -0,0 +1,28 @@
+---
+'@object-ui/app-shell': patch
+'@object-ui/i18n': patch
+---
+
+fix(app-shell)!: Home no longer offers 「Build with AI」 or 「Build an app」
+
+Clause-②: yes (narrowing)
+Metadata-protocol: none
+
+
+
+**BREAKING** for a deployment that overrides the removed translation key below: the override no longer applies, because nothing reads the key any more.
+
+The home page shows on a phone, and on a desktop as the 「No applications yet」 screen when you have no app. Two of its entries are gone from both:
+
+- **「Build with AI」**, the button shown when the build agent is deployed. It is also gone from the buttons of the 「No applications yet」 screen. The sidebar's 「Add app」 menu still offers it.
+- **「Build an app」**, the chip beside the greeting that opened Studio when the build agent is deployed.
+
+Everything else stays. 「Start with a template」 is still there, and on the 「No applications yet」 screen it is now the first button. 「New in Studio」 still shows where the build agent is not deployed. 「Ask AI」 shows exactly where it did before.
+
+Nothing to do on upgrade, unless your deployment overrides the key below.
+
+## Removed translation keys
+
+Removed from every language pack of `@object-ui/i18n` (ar, de, en, es, fr, ja, ko, pt-BR, ru, zh-Hans, zh-Hant). It shipped in 18.6.0.
+
+- `home.build.title` (en: "Build an app")
diff --git a/ui/packages/app-shell/src/console/home/HomePage.tsx b/ui/packages/app-shell/src/console/home/HomePage.tsx
index e963c463a26..6b5357123bf 100644
--- a/ui/packages/app-shell/src/console/home/HomePage.tsx
+++ b/ui/packages/app-shell/src/console/home/HomePage.tsx
@@ -21,8 +21,9 @@
* From 768 px up the page is retired (objectstack#36732): the host redirects
* `/home` into an app whenever the viewer has a product app, so a desktop
* reaches this page only with none, and draws the no-apps empty state
- * ({@link DesktopNoApps}): build with AI, start from a template, the app
- * marketplace, for the viewers who may add an app.
+ * ({@link DesktopNoApps}): start from a template, the app marketplace, or a
+ * new package in Studio, for the viewers who may add an app. Neither 「Build
+ * with AI」 nor 「Build an app」 is drawn on this page (objectstack#37227).
*
* @module
*/
@@ -83,7 +84,7 @@ import {
TooltipTrigger,
cn,
} from '@object-ui/components';
-import { Sparkles, MessageSquareText, Hammer, LayoutGrid } from 'lucide-react';
+import { MessageSquareText, Hammer, LayoutGrid } from 'lucide-react';
import { usePendingDrafts } from '../../preview/usePendingDrafts.js';
import { usePublishAllDrafts } from '../../preview/usePublishAllDrafts.js';
import { fetchPackages } from '../../views/studio-design/packages-io.js';
@@ -93,7 +94,6 @@ import { STUDIO_NEW_PACKAGE_PATH } from '../../views/studio-design/studioNewPack
import { useOpenAssistant } from '../../layout/chatDockControl.js';
import { isProductApp } from '../../utils/homePath.js';
import { useAddAppEntries, useMayAddApp } from '../../hooks/useAddAppEntries.js';
-import { studioLandingPath } from '../../views/studio-design/studioAddress.js';
import { catalogServesBuild } from '../../hooks/surfaceAgent.js';
/**
@@ -101,13 +101,14 @@ import { catalogServesBuild } from '../../hooks/surfaceAgent.js';
* source of truth) — gated PER agent, because the community edition can be in
* any of three states:
* - `askAvailable` — a data/query agent (`ask`/`data_chat`) is deployed → "Ask AI".
- * - `buildAvailable` — a build/authoring agent is deployed → "Build with AI".
- * That's a cloud / AI-Studio feature, ABSENT on open-source builds.
+ * - `buildAvailable` — a build/authoring agent is deployed. That's a cloud /
+ * AI-Studio feature, ABSENT on open-source builds. Home draws no build
+ * button for it (objectstack#37227); it withholds "Ask AI" from a maker.
* - `aiEnabled` — any agent at all (AI is on here in some form).
* - `buildServed` — the catalog lists the build agent itself, alias-aware
- * (`catalogServesBuild`, objectstack#36969): what the "Build an app" chip
- * promises. Where in-app building is closed the catalog keeps `ask` and
- * drops `build`, so `aiEnabled` alone would promise a build nothing serves.
+ * (`catalogServesBuild`, objectstack#36969). Where in-app building is
+ * closed the catalog keeps `ask` and drops `build`; there the builder chip
+ * takes its Studio form, "New in Studio".
* All false while the catalog loads or when AI isn't enabled, so nothing
* flashes and no AI CTA appears where there's no agent to back it.
*
@@ -143,8 +144,8 @@ function useHomeAiAvailability(): {
/**
* One 32 px builder chip at the greeting's right (objectui#12601): "Start with
- * a template" outlined, "Build an app" on the soft primary tint with its icon in
- * the primary colour. Admins only — the caller decides that.
+ * a template" outlined, "New in Studio" on the soft primary tint with its icon
+ * in the primary colour. Admins only — the caller decides that.
*
* Disabled (not hidden) when the session cannot use it: a vanished front door
* reads as a broken page, while a dimmed one explains the deployment's
@@ -259,12 +260,21 @@ function DesktopNoApps({
);
}
+/** The 「Add app」 entry this page does not draw (see {@link NoAppsAddActions}). */
+const BUILD_WITH_AI_ENTRY = 'build-with-ai';
+
/**
* The 「Add app」 doors as the empty state's buttons. Its own component so
* only a viewer who may add an app pays the agent-catalog read the list makes.
+ *
+ * Every door but 「Build with AI」 (objectstack#37227): the maintainer ruled it
+ * off the home page, so this page leaves it out of the shared list, which the
+ * sidebar's 「Add app」 menu reads unchanged. A way to start an app stays: the
+ * template entry where a marketplace is mounted, 「New in Studio」 where the
+ * catalog does not serve the build agent.
*/
function NoAppsAddActions() {
- const entries = useAddAppEntries();
+ const entries = useAddAppEntries().filter((entry) => entry.key !== BUILD_WITH_AI_ENTRY);
if (entries.length === 0) return null;
return (
@@ -286,20 +296,17 @@ function NoAppsAddActions() {
}
/**
- * Home AI call-to-action(s). "Build with AI" only when a build agent is
- * deployed AND the session may author metadata; "Ask AI" only when a
- * data/query agent is deployed. Renders nothing when neither exists (AI off, or
- * only custom agents — those are reachable via the assistant launcher / FAB).
- * `layout="stack"` is used by the empty-state; the hero uses the default inline
- * row. Availability is passed in so the host fetches the catalog once.
+ * Home's AI call-to-action: "Ask AI", only when a data/query agent is
+ * deployed. Renders nothing when none is (AI off, or only custom agents —
+ * those are reachable via the assistant launcher / FAB). `layout="stack"` is
+ * used by the empty-state; the hero uses the default inline row. Availability
+ * is passed in so the host fetches the catalog once.
*
- * "Build with AI" routes to the AI authoring studio, whose output is
- * draft metadata nobody without `manage_metadata` can publish — so it is one of
- * the "any other metadata-authoring CTA" the objectstack#8270 ruling covers.
- * It is HIDDEN rather than disabled: unlike the builder chips it is not the
- * page's structural front door, the chips beside it already carry the reason,
- * and a disabled hero button next to a live "Ask AI" would read as a transient
- * failure. "Ask AI" is read-only and never gated.
+ * There is no "Build with AI" button here any more (objectstack#37227): the
+ * maintainer ruled it off the home page. "Ask AI" keeps the gate it had beside
+ * it, the cloud#1674 maker convergence below: a session for which the build
+ * agent is deployed and that may author metadata is not offered "Ask AI",
+ * since the ask agent would converge that maker straight back onto build.
*/
function HomeAiActions({
askAvailable,
@@ -313,41 +320,29 @@ function HomeAiActions({
buildAvailable: boolean;
canAuthorMetadata: boolean;
/** objectstack#34608 — opens the console's chat drawer on this agent, in place. */
- openAssistant: (agent: 'build' | 'ask') => void;
+ openAssistant: (agent: 'ask') => void;
t: (key: string, opts?: any) => string;
layout?: 'row' | 'stack';
}) {
- const showBuild = buildAvailable && canAuthorMetadata;
- if (!askAvailable && !showBuild) return null;
+ const maker = buildAvailable && canAuthorMetadata;
+ if (!askAvailable || maker) return null;
const container =
layout === 'stack'
? 'mt-6 flex flex-col sm:flex-row items-center gap-3'
: 'flex shrink-0 items-center gap-2';
- // In the greeting row the buttons take the builder chips' 32 px height;
+ // In the greeting row the button takes the builder chips' 32 px height;
// below `sm` both layouts take the 44 px touch target.
const buttonClass = layout === 'stack' ? 'max-sm:h-11' : 'h-8 px-3 text-sm max-sm:h-11';
return (
- {showBuild && (
-
- )}
- {/* cloud#1674 maker convergence: with the build CTA shown, "Ask AI" is
- not a second door — the build composer answers data questions too
- (data superset since cloud#1673), and the ask agent would converge a
- maker straight back onto build. Non-authoring sessions keep it. */}
- {askAvailable && !showBuild && (
-
- )}
+
);
}
@@ -470,7 +465,7 @@ export function HomePage({ checklist }: HomePageProps = {}) {
// objectstack#34608 — the Home AI buttons open the same right-side drawer
// every console page has (in place, no navigation).
const openAssistant = useOpenAssistant();
- const openHomeAssistant = (agent: 'build' | 'ask') => openAssistant({ agent });
+ const openHomeAssistant = (agent: 'ask') => openAssistant({ agent });
const { t, language } = useObjectTranslation();
const metadata = useMetadata();
const { apps, loading } = metadata;
@@ -516,9 +511,9 @@ export function HomePage({ checklist }: HomePageProps = {}) {
// every app mount) is the only "which app is the user in" signal available
// here, and it is undefined on a cold landing straight at `/home`.
const { currentAppName } = useNavigationContext();
- // AI CTA gating, per agent: "Build with AI" only when a build agent is
- // deployed (cloud / AI Studio); "Ask AI" only when a data agent is; neither
- // when AI isn't enabled. Community builds typically land in the ask-only state.
+ // AI CTA gating, per agent: "Ask AI" only when a data agent is deployed,
+ // and not for a maker the build agent serves; nothing when AI isn't
+ // enabled. Home draws no "Build with AI" (objectstack#37227).
const { aiResolved, askAvailable, buildAvailable, buildServed } = useHomeAiAvailability();
// objectstack#8270 — the authoring CTAs below are gated on the SERVER's
// capability answer, not on the admin ROLE: on the EE multi-tenant deploy an
@@ -965,24 +960,13 @@ export function HomePage({ checklist }: HomePageProps = {}) {
* since Studio is then the ONLY way to build, a session that
* may not author gets no chip rather than a dimmed one (the
* template chip beside it still carries the reason). With
- * agents present nothing changes. The chip waits for the
- * catalog's answer, so neither form flashes before the other.
- *
- * objectstack#36969 — the AI form is drawn only where the
- * catalog serves the build agent itself (`buildServed`), not
- * any agent: a deployment that closed in-app building still
- * serves `ask`, and there the chip takes this Studio form. */}
- {aiStudioEnabled && buildServed && (
- navigate(studioLandingPath())}
- disabledReason={!canAuthorMetadata ? authoringGateReason : undefined}
- reasonId={authoringReasonId}
- testId="home-build-app"
- />
- )}
+ * the build agent served, the chip's other form, "Build an
+ * app" to bare `/studio`, is gone (objectstack#37227): the
+ * maintainer ruled it off this page, with "Build with AI".
+ * The Studio form waits for the catalog's answer, so it
+ * never flashes, and is drawn only where the catalog does not
+ * serve the build agent itself (`buildServed`,
+ * objectstack#36969). */}
{aiStudioEnabled && aiResolved && !buildServed && canAuthorMetadata && (
({
vi.mock('@object-ui/plugin-chatbot/core', async (importOriginal) => ({
...(await importOriginal()),
- useAgents: () => ({ agents: [{ name: 'build' }] }),
+ // objectstack#37227 — Home draws no build chip where the catalog serves the
+ // build agent ("Build an app" was ruled off the page), so the chip this flag
+ // gates is the Studio form, "New in Studio", drawn where it does not.
+ useAgents: () => ({ agents: [{ name: 'custom_helper' }] }),
isAskAgent: () => false,
agentHasCapability: () => true,
}));
@@ -304,9 +307,10 @@ describe('Home on a runtime reporting features.aiStudio: false (objectui#5521)',
await bootOn(serverConfig({ aiStudio: false }));
});
- it('withholds the "Build an app" cover entirely — not dimmed, gone', () => {
+ it('withholds the build chip entirely — not dimmed, gone', () => {
renderHome();
+ expect(screen.queryByTestId('home-build-in-studio')).toBeNull();
expect(screen.queryByTestId('home-build-app')).toBeNull();
// Counter-probe against a page that rendered NOTHING: the strip behind the
// cover is still there with the workspace's app on it.
@@ -352,7 +356,7 @@ describe('Home on the measured composed hosted-SaaS shape (objectui#5521)', () =
await bootOn(serverConfig({ aiStudio: false, marketplace: false, installLocal: false }));
renderHome();
- expect(screen.queryByTestId('home-build-app')).toBeNull();
+ expect(screen.queryByTestId('home-build-in-studio')).toBeNull();
expect(screen.getByTestId('home-start-template')).toBeDisabled();
expect(screen.getByTestId('home-marketplace-disabled-reason')).toHaveTextContent(
'«home.template.marketplaceDisabled»',
@@ -363,13 +367,13 @@ describe('Home on the measured composed hosted-SaaS shape (objectui#5521)', () =
});
describe('Home on a runtime that DOES offer AI Studio', () => {
- it('keeps the "Build an app" cover exactly as before', async () => {
+ it('keeps the build chip exactly as before', async () => {
// Same fixture, same helper, one flag flipped — so the denials above cannot
// be passing because the card never renders in this suite at all.
await bootOn(serverConfig({ aiStudio: true }));
renderHome();
- const build = screen.getByTestId('home-build-app');
+ const build = screen.getByTestId('home-build-in-studio');
expect(build).toBeInTheDocument();
expect(build).toBeEnabled();
});
@@ -382,7 +386,7 @@ describe('Home on a runtime that DOES offer AI Studio', () => {
await bootOn(serverConfig({}));
renderHome();
- expect(screen.getByTestId('home-build-app')).toBeEnabled();
+ expect(screen.getByTestId('home-build-in-studio')).toBeEnabled();
});
it('fails OPEN when the runtime answers no config at all', async () => {
@@ -390,6 +394,6 @@ describe('Home on a runtime that DOES offer AI Studio', () => {
renderHome();
- expect(screen.getByTestId('home-build-app')).toBeEnabled();
+ expect(screen.getByTestId('home-build-in-studio')).toBeEnabled();
});
});
diff --git a/ui/packages/app-shell/src/console/home/__tests__/HomePage.authoringCapabilityGate.test.tsx b/ui/packages/app-shell/src/console/home/__tests__/HomePage.authoringCapabilityGate.test.tsx
index bb87394df0d..4368cf6859a 100644
--- a/ui/packages/app-shell/src/console/home/__tests__/HomePage.authoringCapabilityGate.test.tsx
+++ b/ui/packages/app-shell/src/console/home/__tests__/HomePage.authoringCapabilityGate.test.tsx
@@ -80,9 +80,10 @@ vi.mock('@object-ui/auth', async (importOriginal) => ({
useWorkspaceAdminStatus: () => ({ isAdmin: true, isResolved: true }),
}));
-// An authoring-capable AI agent IS deployed in every case, so "Build with AI"
-// is held back only by the capability gate under test and never by the
-// unrelated cloud#816 agent-availability gate.
+// An authoring-capable AI agent IS deployed in every case, so no case here
+// is shaped by the unrelated cloud#816 agent-availability gate. With it served,
+// Home draws neither "Build with AI" nor "Build an app" (objectstack#37227):
+// the builder chip the gate withholds is "Start with a template".
vi.mock('@object-ui/plugin-chatbot/core', async (importOriginal) => ({
...(await importOriginal()),
useAgents: () => ({ agents: [{ name: 'build' }] }),
@@ -274,10 +275,10 @@ describe('HomePage authoring-CTA capability gate (objectstack#8270)', () => {
});
describe('the ruled case — admin by role, no `manage_metadata`', () => {
- it('disables both builder CTAs and says why, in the user’s language', async () => {
+ it('disables the builder CTA and says why, in the user’s language', async () => {
renderHome(eePayload(OWNER_CAPS));
- expect(screen.getByTestId('home-build-app')).toBeDisabled();
+ expect(screen.queryByTestId('home-build-app')).toBeNull();
expect(screen.getByTestId('home-start-template')).toBeDisabled();
// The reason is reachable from each withheld chip — its tooltip wrapper
// and an `aria-describedby` on the button (objectui#12601, the
@@ -286,7 +287,6 @@ describe('HomePage authoring-CTA capability gate (objectstack#8270)', () => {
// `HomePage.greetingAndApps-12601.test.tsx`.
const reason = screen.getByTestId('home-authoring-gate-reason');
expect(reason).toHaveTextContent('«home.build.noCapability»');
- expect(screen.getByTestId('home-build-app')).toHaveAttribute('aria-describedby', reason.id);
expect(screen.getByTestId('home-start-template')).toHaveAttribute('aria-describedby', reason.id);
});
@@ -294,10 +294,9 @@ describe('HomePage authoring-CTA capability gate (objectstack#8270)', () => {
const user = userEvent.setup();
renderHome(eePayload(OWNER_CAPS));
- await user.click(screen.getByTestId('home-build-app'));
await user.click(screen.getByTestId('home-start-template'));
- // `/studio` is where the new-package dialog lives; reaching it was the
+ // The marketplace is where a template is installed; reaching it was the
// whole defect. A disabled button must not merely look inert.
expect(navigateMock).not.toHaveBeenCalled();
});
@@ -316,20 +315,23 @@ describe('HomePage authoring-CTA capability gate (objectstack#8270)', () => {
});
describe('the capability present — nothing is withheld', () => {
- it('leaves every authoring CTA live and routes "Build an app" to /studio', async () => {
+ it('leaves every authoring CTA live, and draws neither build entry (objectstack#37227)', async () => {
const user = userEvent.setup();
renderHome(eePayload([...OWNER_CAPS, 'manage_metadata']));
- const build = screen.getByTestId('home-build-app');
- expect(build).toBeEnabled();
- expect(screen.getByTestId('home-start-template')).toBeEnabled();
+ const template = screen.getByTestId('home-start-template');
+ expect(template).toBeEnabled();
expect(screen.getByTestId('browse-marketplace-btn')).toBeInTheDocument();
- expect(screen.getByTestId('home-build-with-ai')).toBeInTheDocument();
+ // The build agent is served and the session may author: before
+ // objectstack#37227 both "Build an app" and "Build with AI" stood here.
+ expect(screen.queryByTestId('home-build-app')).toBeNull();
+ expect(screen.queryByTestId('home-build-with-ai')).toBeNull();
// No reason line when there is nothing to explain.
expect(screen.queryByTestId('home-authoring-gate-reason')).toBeNull();
- await user.click(build);
- expect(navigateMock).toHaveBeenCalledWith('/studio');
+ await user.click(template);
+ expect(navigateMock).toHaveBeenCalledWith('/apps/setup/system/marketplace');
+ expect(navigateMock).not.toHaveBeenCalledWith('/studio');
});
});
@@ -344,7 +346,6 @@ describe('HomePage authoring-CTA capability gate (objectstack#8270)', () => {
// doctrine `useCapabilityGate` states for ADR-0066 gates).
renderHome(eePayload(undefined));
- expect(screen.getByTestId('home-build-app')).toBeEnabled();
expect(screen.getByTestId('home-start-template')).toBeEnabled();
expect(screen.queryByTestId('home-authoring-gate-reason')).toBeNull();
});
@@ -360,7 +361,6 @@ describe('HomePage authoring-CTA capability gate (objectstack#8270)', () => {
// gate exactly like any other reported set that lacks the capability.
renderHome(eePayload([]));
- expect(screen.getByTestId('home-build-app')).toBeDisabled();
expect(screen.getByTestId('home-start-template')).toBeDisabled();
expect(screen.getByTestId('home-authoring-gate-reason')).toHaveTextContent(
'«home.build.noCapability»',
@@ -390,11 +390,16 @@ describe('HomePage authoring-CTA capability gate (objectstack#8270)', () => {
expect(screen.queryByTestId('home-build-with-ai')).toBeNull();
});
- it('keeps the ordinary admin welcome when the capability IS held', () => {
+ it('keeps the ordinary admin welcome when the capability IS held, without "Build with AI" (objectstack#37227)', () => {
renderHome(eePayload([...OWNER_CAPS, 'manage_metadata']));
expect(screen.queryByTestId('home-authoring-gate-reason-empty')).toBeNull();
- expect(screen.getByTestId('home-build-with-ai')).toBeInTheDocument();
+ expect(screen.getByText('«home.welcome»')).toBeInTheDocument();
+ expect(screen.getByText('«home.welcomeAdminDescription»')).toBeInTheDocument();
+ // The phone's zero-app welcome, a maker the build agent serves: the
+ // build CTA stood here before; "Ask AI" stays withheld for a maker.
+ expect(screen.queryByTestId('home-build-with-ai')).toBeNull();
+ expect(screen.queryByText('«home.buildWithAI»')).toBeNull();
});
});
});
diff --git a/ui/packages/app-shell/src/console/home/__tests__/HomePage.desktopNoApps-36732.test.tsx b/ui/packages/app-shell/src/console/home/__tests__/HomePage.desktopNoApps-36732.test.tsx
index 3800e17220c..0631c9757a1 100644
--- a/ui/packages/app-shell/src/console/home/__tests__/HomePage.desktopNoApps-36732.test.tsx
+++ b/ui/packages/app-shell/src/console/home/__tests__/HomePage.desktopNoApps-36732.test.tsx
@@ -4,8 +4,10 @@
* objectstack#36732 — the desktop's no-apps empty state, what is left of the
* retired platform home page. From 768 px up a viewer with no product app (no
* app but Setup and the platform's own) is drawn 「No applications yet」, and a
- * viewer who may add an app is offered the sidebar's 「Add app」 doors (build
- * with AI, start from a template, the marketplace) as buttons. An administrator
+ * viewer who may add an app is offered the sidebar's 「Add app」 doors (start
+ * from a template, the marketplace, or 「New in Studio」) as buttons, every one
+ * but 「Build with AI」, which the maintainer ruled off the home page
+ * (objectstack#37227; the sidebar menu still offers it). An administrator
* without `manage_metadata` is told why there are none (objectstack#8270);
* anyone else is told their administrator shares apps with them.
*
@@ -116,13 +118,18 @@ afterEach(() => {
});
describe('HomePage — the desktop no-apps empty state (objectstack#36732)', () => {
- it('offers an admin who may author the 「Add app」 doors, building with AI first', () => {
+ it('offers an admin who may author the 「Add app」 doors but 「Build with AI」, the template first (objectstack#37227)', () => {
render();
const empty = screen.getByTestId('home-no-apps');
expect(empty).toHaveTextContent('«home.noAppsTitle»');
expect(empty).toHaveTextContent('«home.noAppsAddDescription»');
- const ai = screen.getByTestId('home-no-apps-build-with-ai');
- expect(ai).toHaveAttribute('href', '/studio');
+ // The build agent is served here, so the shared list holds 「Build with AI」;
+ // this page leaves it out, and the template entry is the way to start an app.
+ expect(screen.queryByTestId('home-no-apps-build-with-ai')).not.toBeInTheDocument();
+ expect(empty).not.toHaveTextContent('«home.buildWithAI»');
+ expect(empty.querySelector('a[href="/studio"]')).toBeNull();
+ const doors = Array.from(empty.querySelectorAll('a[data-testid^="home-no-apps-"]'));
+ expect(doors.map((a) => a.getAttribute('data-testid'))).toEqual(['home-no-apps-template', 'home-no-apps-marketplace']);
expect(screen.getByTestId('home-no-apps-template')).toHaveAttribute('href', '/apps/setup/system/marketplace');
expect(screen.getByTestId('home-no-apps-marketplace')).toHaveAttribute('href', '/apps/setup/system/marketplace');
// The app tiles the retired page drew are gone: Setup and Studio are no app of the viewer's.
diff --git a/ui/packages/app-shell/src/console/home/__tests__/HomePage.greetingAndApps-12601.test.tsx b/ui/packages/app-shell/src/console/home/__tests__/HomePage.greetingAndApps-12601.test.tsx
index 011741a3e90..6a86164aada 100644
--- a/ui/packages/app-shell/src/console/home/__tests__/HomePage.greetingAndApps-12601.test.tsx
+++ b/ui/packages/app-shell/src/console/home/__tests__/HomePage.greetingAndApps-12601.test.tsx
@@ -92,10 +92,11 @@ vi.mock('@object-ui/auth', async (importOriginal) => ({
}));
// The build agent served beside a custom one, with the ask and authoring CTA
-// predicates stubbed off: the build chip keeps its "Build an app" form (an
-// agent-less deployment, and since objectstack#36969 one that serves no build
-// agent, gets its Studio form, `HomePage.noAgentsBuildChip-26614.test.tsx`),
-// and no AI CTA joins the greeting row, which holds the builder chips alone.
+// predicates stubbed off: no build chip is drawn, since "Build an app" was
+// ruled off the page (objectstack#37227; an agent-less deployment, and since
+// objectstack#36969 one that serves no build agent, gets the Studio form,
+// `HomePage.noAgentsBuildChip-26614.test.tsx`), and no AI CTA joins the
+// greeting row, which holds the template chip alone.
vi.mock('@object-ui/plugin-chatbot/core', async (importOriginal) => ({
...(await importOriginal()),
useAgents: () => ({ agents: [{ name: 'build' }, { name: 'custom_helper' }] }),
@@ -234,25 +235,24 @@ describe('the builder chips (objectui#12601)', () => {
expect(screen.queryByTestId('home-start-template')).toBeNull();
});
- it('CONTROL — an admin gets both chips, live, beside the greeting', async () => {
+ it('CONTROL — an admin gets the template chip, live, beside the greeting, and no "Build an app"', async () => {
const user = userEvent.setup();
render();
- const build = screen.getByTestId('home-build-app');
const template = screen.getByTestId('home-start-template');
- expect(build).toBeEnabled();
expect(template).toBeEnabled();
- expect(build).toHaveTextContent('«home.build.title»');
expect(template).toHaveTextContent('«home.template.title»');
- // One row: the chips share the summary's section, with no cover card.
+ // One row: the chip shares the summary's section, with no cover card.
const section = screen.getByTestId('home-work-summary').closest('section')!;
- expect(section).toContainElement(build);
expect(section).toContainElement(template);
+ // objectstack#37227 — the build agent is served: no build chip of either form.
+ expect(screen.queryByTestId('home-build-app')).toBeNull();
+ expect(screen.queryByTestId('home-build-in-studio')).toBeNull();
+ expect(section).not.toHaveTextContent('«home.build.title»');
expect(screen.queryByTestId('home-authoring-gate-reason')).toBeNull();
- await user.click(build);
- expect(navigateMock).toHaveBeenCalledWith('/studio');
await user.click(template);
expect(navigateMock).toHaveBeenCalledWith('/apps/setup/system/marketplace');
+ expect(navigateMock).not.toHaveBeenCalledWith('/studio');
});
it('a chip withheld for want of the capability explains itself through the tooltip wrapper', async () => {
@@ -265,7 +265,7 @@ describe('the builder chips (objectui#12601)', () => {
expect(reason).toHaveClass('sr-only');
expect(reason.id).not.toBe('');
- for (const testId of ['home-build-app', 'home-start-template']) {
+ for (const testId of ['home-start-template']) {
const chip = screen.getByTestId(testId);
expect(chip).toBeDisabled();
// The button and its wrapper are both described by the one reason.
@@ -277,11 +277,11 @@ describe('the builder chips (objectui#12601)', () => {
expect(wrapper).toHaveAttribute('aria-describedby', reason.id);
}
- await user.hover(screen.getByTestId('home-build-app').parentElement!);
+ await user.hover(screen.getByTestId('home-start-template').parentElement!);
expect(await screen.findByRole('tooltip')).toHaveTextContent('«home.build.noCapability»');
// Withheld means inert: a click reaches no route.
- await user.click(screen.getByTestId('home-build-app'));
+ await user.click(screen.getByTestId('home-start-template'));
expect(navigateMock).not.toHaveBeenCalled();
});
@@ -290,7 +290,7 @@ describe('the builder chips (objectui#12601)', () => {
state.marketplaceEnabled = false;
render();
- expect(screen.getByTestId('home-build-app')).toBeEnabled();
+ expect(screen.queryByTestId('home-build-app')).toBeNull();
const template = screen.getByTestId('home-start-template');
expect(template).toBeDisabled();
const reason = screen.getByTestId('home-marketplace-disabled-reason');
diff --git a/ui/packages/app-shell/src/console/home/__tests__/HomePage.marketplaceDisabled.test.tsx b/ui/packages/app-shell/src/console/home/__tests__/HomePage.marketplaceDisabled.test.tsx
index 37ec4092db6..76f4ff0fbf7 100644
--- a/ui/packages/app-shell/src/console/home/__tests__/HomePage.marketplaceDisabled.test.tsx
+++ b/ui/packages/app-shell/src/console/home/__tests__/HomePage.marketplaceDisabled.test.tsx
@@ -69,7 +69,10 @@ vi.mock('@object-ui/auth', async (importOriginal) => ({
vi.mock('@object-ui/plugin-chatbot/core', async (importOriginal) => ({
...(await importOriginal()),
- useAgents: () => ({ agents: [{ name: 'build' }] }),
+ // objectstack#37227 — where the catalog serves the build agent Home draws no
+ // build chip ("Build an app" was ruled off the page); a custom agent alone
+ // keeps the builder entry this gate must leave alone, "New in Studio".
+ useAgents: () => ({ agents: [{ name: 'custom_helper' }] }),
isAskAgent: () => false,
agentHasCapability: () => true,
}));
@@ -298,10 +301,11 @@ describe('Home on a runtime deployed with OS_CLOUD_URL=off (objectui#5504)', ()
});
it('leaves the marketplace-independent builder entry alone', () => {
- // "Build an app" goes to /studio and needs no catalog. A gate that swept it
- // up would remove the product front door from every air-gapped deployment.
+ // "New in Studio" opens Studio's new-package flow and needs no catalog. A
+ // gate that swept it up would remove the product front door from every
+ // air-gapped deployment.
renderHome();
- expect(screen.getByTestId('home-build-app')).toBeEnabled();
+ expect(screen.getByTestId('home-build-in-studio')).toBeEnabled();
});
});
diff --git a/ui/packages/app-shell/src/console/home/__tests__/HomePage.noAgentsBuildChip-26614.test.tsx b/ui/packages/app-shell/src/console/home/__tests__/HomePage.noAgentsBuildChip-26614.test.tsx
index 45008497bbd..1b637f2d186 100644
--- a/ui/packages/app-shell/src/console/home/__tests__/HomePage.noAgentsBuildChip-26614.test.tsx
+++ b/ui/packages/app-shell/src/console/home/__tests__/HomePage.noAgentsBuildChip-26614.test.tsx
@@ -23,6 +23,11 @@
* Studio" form there, as for an empty catalog. So the unchanged-chip cases
* serve `build`; a catalog of `ask` or of another agent alone is pinned below.
*
+ * objectstack#37227 — the first bullet above no longer holds: the maintainer
+ * ruled "Build an app" (to bare `/studio`) off the home page, with "Build with
+ * AI". Where the catalog serves the build agent the chip row now draws no build
+ * chip of either form; "New in Studio" is unchanged where it does not.
+ *
* The catalog stand-in moves the way the real `useAgents` does: an empty first
* frame before the request leaves, then loading, then the answer. `t` echoes
* the key, so a hardcoded string fails here; that every key exists in all ten
@@ -32,7 +37,7 @@
import '@testing-library/jest-dom/vitest';
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import React from 'react';
-import { render, screen, cleanup } from '@testing-library/react';
+import { render, screen, cleanup, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
const navigateMock = vi.fn();
@@ -43,6 +48,8 @@ const state = vi.hoisted(() => ({
agents: [] as Array<{ name: string }>,
/** Holds the catalog in flight. */
catalogPending: false,
+ /** Set once the stand-in has drawn the catalog's answer (objectstack#37227). */
+ answered: false,
}));
vi.mock('react-router-dom', async () => {
@@ -87,6 +94,7 @@ vi.mock('@object-ui/plugin-chatbot/core', async (importOriginal) => {
if (phase === 'idle') setPhase('loading');
else if (phase === 'loading' && !state.catalogPending) setPhase('answered');
}, [phase]);
+ if (phase === 'answered') state.answered = true;
return { agents: phase === 'answered' ? state.agents : [], isLoading: phase === 'loading' };
},
// A custom agent: AI is on, and no ask or build CTA joins the row.
@@ -161,34 +169,44 @@ beforeEach(() => {
state.canAuthorMetadata = true;
state.agents = [];
state.catalogPending = false;
+ state.answered = false;
});
+/**
+ * An absence read before the catalog answers would pass on a page that has
+ * not yet drawn the chip at all, so the cases that pin one wait for the answer.
+ */
+async function catalogAnswered(): Promise {
+ await waitFor(() => expect(state.answered).toBe(true));
+}
+
afterEach(() => {
cleanup();
});
-describe('with the build agent in the catalog, the build chip is unchanged (objectstack#26614)', () => {
+describe('with the build agent in the catalog, no build chip is drawn (objectstack#37227)', () => {
beforeEach(() => {
state.agents = [{ name: 'build' }, { name: 'custom_helper' }];
});
- it('"Build an app" opens Studio', async () => {
- const user = userEvent.setup();
+ it('neither "Build an app" nor "Build with AI"; the template chip stays', async () => {
render();
- const build = await screen.findByTestId('home-build-app');
- expect(build).toBeEnabled();
- expect(build).toHaveTextContent('«home.build.title»');
+ expect(await screen.findByTestId('home-start-template')).toBeEnabled();
+ await catalogAnswered();
+ expect(screen.queryByTestId('home-build-app')).toBeNull();
+ expect(screen.queryByTestId('home-build-with-ai')).toBeNull();
expect(screen.queryByTestId('home-build-in-studio')).toBeNull();
- await user.click(build);
- expect(navigateMock).toHaveBeenCalledWith('/studio');
});
- it('a session that may not author still gets it dimmed, with its reason', async () => {
+ it('a session that may not author gets none either; the template chip keeps the reason', async () => {
state.canAuthorMetadata = false;
render();
- const build = await screen.findByTestId('home-build-app');
- expect(build).toBeDisabled();
- expect(build).toHaveAttribute('aria-describedby', screen.getByTestId('home-authoring-gate-reason').id);
+ await catalogAnswered();
+ const template = await screen.findByTestId('home-start-template');
+ expect(template).toBeDisabled();
+ expect(template).toHaveAttribute('aria-describedby', screen.getByTestId('home-authoring-gate-reason').id);
+ expect(screen.queryByTestId('home-build-app')).toBeNull();
+ expect(screen.queryByTestId('home-build-in-studio')).toBeNull();
});
});
@@ -241,15 +259,13 @@ describe('without the build agent in the catalog, the chip takes its Studio form
expect(screen.queryByTestId('home-build-app')).toBeNull();
});
- it('regression: the build agent\'s legacy id keeps "Build an app", to /studio', async () => {
+ it('regression: the build agent\'s legacy id still counts as the build agent, so no Studio form either', async () => {
state.agents = [{ name: 'metadata_assistant' }, { name: 'data_chat' }];
- const user = userEvent.setup();
render();
- const build = await screen.findByTestId('home-build-app');
- expect(build).toHaveTextContent('«home.build.title»');
+ expect(await screen.findByTestId('home-start-template')).toBeEnabled();
+ await catalogAnswered();
expect(screen.queryByTestId('home-build-in-studio')).toBeNull();
- await user.click(build);
- expect(navigateMock).toHaveBeenCalledWith('/studio');
+ expect(screen.queryByTestId('home-build-app')).toBeNull();
});
});
diff --git a/ui/packages/app-shell/src/console/home/__tests__/HomePage.phoneTapTargets-29147.test.tsx b/ui/packages/app-shell/src/console/home/__tests__/HomePage.phoneTapTargets-29147.test.tsx
index 364877a7602..39023a90e42 100644
--- a/ui/packages/app-shell/src/console/home/__tests__/HomePage.phoneTapTargets-29147.test.tsx
+++ b/ui/packages/app-shell/src/console/home/__tests__/HomePage.phoneTapTargets-29147.test.tsx
@@ -19,7 +19,7 @@
import '@testing-library/jest-dom/vitest';
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import React from 'react';
-import { render, screen, cleanup, within } from '@testing-library/react';
+import { render, screen, cleanup, within, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
const navigateMock = vi.fn();
@@ -30,6 +30,8 @@ const state = vi.hoisted(() => ({
agents: [] as Array<{ name: string }>,
askAgent: false,
buildAgent: false,
+ /** Set once the stand-in has drawn the catalog's answer (objectstack#37227). */
+ answered: false,
}));
vi.mock('react-router-dom', async () => {
@@ -76,6 +78,7 @@ vi.mock('@object-ui/plugin-chatbot/core', async (importOriginal) => {
if (phase === 'idle') setPhase('loading');
else if (phase === 'loading') setPhase('answered');
}, [phase]);
+ if (phase === 'answered') state.answered = true;
return { agents: phase === 'answered' ? state.agents : [], isLoading: phase === 'loading' };
},
isAskAgent: () => state.askAgent,
@@ -164,6 +167,7 @@ beforeEach(() => {
state.agents = [];
state.askAgent = false;
state.buildAgent = false;
+ state.answered = false;
});
afterEach(() => {
@@ -177,12 +181,15 @@ describe('the greeting row (objectstack#29147)', () => {
expectPhoneTarget(screen.getByTestId('home-start-template'), ['h-8'], ['max-sm:h-11']);
});
- it('"Build an app" and "Build with AI" are 44 px below sm and 32 px from sm', async () => {
+ it('with the build agent served, neither "Build an app" nor "Build with AI" joins the row (objectstack#37227)', async () => {
state.agents = [{ name: 'build' }];
state.buildAgent = true;
render();
- expectPhoneTarget(await screen.findByTestId('home-build-app'), ['h-8'], ['max-sm:h-11']);
- expectPhoneTarget(screen.getByTestId('home-build-with-ai'), ['h-8'], ['max-sm:h-11']);
+ expectPhoneTarget(await screen.findByTestId('home-start-template'), ['h-8'], ['max-sm:h-11']);
+ // Absence is read after the catalog answers: before it, neither was drawn anyway.
+ await waitFor(() => expect(state.answered).toBe(true));
+ expect(screen.queryByTestId('home-build-app')).toBeNull();
+ expect(screen.queryByTestId('home-build-with-ai')).toBeNull();
});
it('"Ask AI" is 44 px below sm and 32 px from sm', async () => {
diff --git a/ui/packages/i18n/src/locales/ar.ts b/ui/packages/i18n/src/locales/ar.ts
index a570d169563..bbd22ba0c3e 100644
--- a/ui/packages/i18n/src/locales/ar.ts
+++ b/ui/packages/i18n/src/locales/ar.ts
@@ -4047,7 +4047,6 @@ const ar = {
},
home: {
build: {
- title: "إنشاء تطبيق",
noCapability: "إنشاء التطبيقات غير متاح في هذا النظام — فهو يتطلب إذن «إدارة البيانات الوصفية» الذي لا يملكه حسابك.",
inStudio: "إنشاء جديد في Studio",
},
diff --git a/ui/packages/i18n/src/locales/de.ts b/ui/packages/i18n/src/locales/de.ts
index bbdddfb1524..e636314ea91 100644
--- a/ui/packages/i18n/src/locales/de.ts
+++ b/ui/packages/i18n/src/locales/de.ts
@@ -3724,7 +3724,6 @@ const de = {
},
home: {
build: {
- title: "App erstellen",
noCapability: "Das Erstellen von Apps ist in diesem System nicht verfügbar — es erfordert die Berechtigung „Metadaten verwalten“, die Ihr Konto nicht besitzt.",
inStudio: "Neu in Studio",
},
diff --git a/ui/packages/i18n/src/locales/en.ts b/ui/packages/i18n/src/locales/en.ts
index 213556e881d..83ae048a56c 100644
--- a/ui/packages/i18n/src/locales/en.ts
+++ b/ui/packages/i18n/src/locales/en.ts
@@ -4525,7 +4525,6 @@ const en = {
// `appTileOpenedLine-12601.test.ts` (app-shell).
appOpened: '{{time}}',
build: {
- title: 'Build an app',
noCapability: 'Building apps isn\'t available in this system — it requires the “Manage Metadata” permission, which your account doesn\'t have.',
inStudio: 'New in Studio',
},
diff --git a/ui/packages/i18n/src/locales/es.ts b/ui/packages/i18n/src/locales/es.ts
index 02593fd2e78..1a8f6a9e0e9 100644
--- a/ui/packages/i18n/src/locales/es.ts
+++ b/ui/packages/i18n/src/locales/es.ts
@@ -3806,7 +3806,6 @@ const es = {
},
home: {
build: {
- title: "Crear una aplicación",
noCapability: "La creación de aplicaciones no está disponible en este sistema: requiere el permiso «Gestionar metadatos», que su cuenta no tiene.",
inStudio: "Nuevo en Studio",
},
diff --git a/ui/packages/i18n/src/locales/fr.ts b/ui/packages/i18n/src/locales/fr.ts
index 454eed991ec..71d18e0d511 100644
--- a/ui/packages/i18n/src/locales/fr.ts
+++ b/ui/packages/i18n/src/locales/fr.ts
@@ -3802,7 +3802,6 @@ const fr = {
},
home: {
build: {
- title: "Créer une application",
noCapability: "La création d'applications n'est pas disponible dans ce système : elle requiert l'autorisation « Gérer les métadonnées », que votre compte ne possède pas.",
inStudio: "Nouveau dans Studio",
},
diff --git a/ui/packages/i18n/src/locales/ja.ts b/ui/packages/i18n/src/locales/ja.ts
index c30c66763b6..1434a0aacfc 100644
--- a/ui/packages/i18n/src/locales/ja.ts
+++ b/ui/packages/i18n/src/locales/ja.ts
@@ -3726,7 +3726,6 @@ const ja = {
},
home: {
build: {
- title: "アプリを作る",
noCapability: "このシステムではアプリの作成はできません — 「メタデータ管理」権限が必要ですが、お使いのアカウントにはありません。",
inStudio: "Studio で新規作成",
},
diff --git a/ui/packages/i18n/src/locales/ko.ts b/ui/packages/i18n/src/locales/ko.ts
index a87cf7ba6f5..f61af560f05 100644
--- a/ui/packages/i18n/src/locales/ko.ts
+++ b/ui/packages/i18n/src/locales/ko.ts
@@ -3724,7 +3724,6 @@ const ko = {
},
home: {
build: {
- title: "앱 만들기",
noCapability: "이 시스템에서는 앱 만들기를 사용할 수 없습니다 — ‘메타데이터 관리’ 권한이 필요하지만 계정에 해당 권한이 없습니다.",
inStudio: "Studio에서 새로 만들기",
},
diff --git a/ui/packages/i18n/src/locales/pt-BR.ts b/ui/packages/i18n/src/locales/pt-BR.ts
index 09d94b638b4..19d5bf1da29 100644
--- a/ui/packages/i18n/src/locales/pt-BR.ts
+++ b/ui/packages/i18n/src/locales/pt-BR.ts
@@ -3801,7 +3801,6 @@ const pt = {
},
home: {
build: {
- title: "Criar um aplicativo",
noCapability: "A criação de aplicativos não está disponível neste sistema — ela exige a permissão “Gerenciar metadados”, que sua conta não possui.",
inStudio: "Novo no Studio",
},
diff --git a/ui/packages/i18n/src/locales/ru.ts b/ui/packages/i18n/src/locales/ru.ts
index bbe3e564474..56efb4ccff5 100644
--- a/ui/packages/i18n/src/locales/ru.ts
+++ b/ui/packages/i18n/src/locales/ru.ts
@@ -3893,7 +3893,6 @@ const ru = {
},
home: {
build: {
- title: "Создать приложение",
noCapability: "Создание приложений недоступно в этой системе — для этого нужно разрешение «Управление метаданными», которого нет у вашей учётной записи.",
inStudio: "Создать в Studio",
},
diff --git a/ui/packages/i18n/src/locales/zh-Hans.ts b/ui/packages/i18n/src/locales/zh-Hans.ts
index 97ea9b36f2c..f53c60b35d0 100644
--- a/ui/packages/i18n/src/locales/zh-Hans.ts
+++ b/ui/packages/i18n/src/locales/zh-Hans.ts
@@ -3900,7 +3900,6 @@ const zh = {
addApp: '添加应用',
appOpened: '{{time}}打开',
build: {
- title: '构建应用',
noCapability: '本系统不提供构建应用功能 — 它需要「管理元数据」权限,而你的账号没有该权限。',
inStudio: '在 Studio 中新建',
},
diff --git a/ui/packages/i18n/src/locales/zh-Hant.ts b/ui/packages/i18n/src/locales/zh-Hant.ts
index c16ecda97c7..82a7351da3f 100644
--- a/ui/packages/i18n/src/locales/zh-Hant.ts
+++ b/ui/packages/i18n/src/locales/zh-Hant.ts
@@ -3900,7 +3900,6 @@ const zhHant = {
addApp: '新增應用',
appOpened: '{{time}}開啟',
build: {
- title: '構建應用',
noCapability: '本系統不提供構建應用功能 — 它需要「管理中繼資料」權限,而你的賬號沒有該權限。',
inStudio: '在 Studio 中新建',
},