Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .changeset/36739-org-basics-checklist-pill.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
'@object-ui/console': patch
'@object-ui/app-shell': patch
'@object-ui/i18n': patch
---

feat(console): the first-run checklist asks for the organization's basics in one form, leaves the rest optional, and follows the administrator as a 「Get started n/m」 pill in the sidebar

Clause-②: yes (widening)
Metadata-protocol: none

The administrator's first-run checklist had five setup rows that each saved on their own (the organization's name, language and country, timezone, currency) and counted every row, so it only went away once mail, invitations and AI were set up too. Following the maintainer's ruling on objectstack#36739:

- **One form, one save.** A single 「Organization basics」 row opens one form with the organization's name, default language, country, timezone and currency. Values the server does not hold yet are suggested from the browser, and a setting with neither a value nor a suggestion must be filled in like the name; nothing is written until Save, which renames the organization (when the name changed) and writes the four settings in one call. A refused rename or a refused setting shows on its field, as before. The row is done once the organization has a real name and all four settings are set.
- **Only the basics are required.** Mail, invitations, the built-in AI provider and connecting an outside assistant become optional rows (marked 「Optional」); they still tick themselves when the server says they are done. On the hosted profile, 「Put in your first app」 stays required. The checklist is complete, and stands aside on Home, once the required rows are done; its progress (n/m) still counts every row.
- **A pill in every app.** For the administrator only, a 「Get started n/m」 pill sits at the bottom of every app's sidebar (on the folded icon rail it keeps its icon, with the count in its accessible name and tooltip). A press opens the checklist in place in a popover; the popover's X only closes it, and 「Hide on this device」 under the list hides the pill and Home's card. On a phone, which has no resident sidebar, the pill sits after the app's menu on the app's home page. It disappears once the required rows are done, or once the administrator hides it on this device.
- **Setup's first page keeps the full list**, done rows included, even after the checklist is complete or hidden; a completed list folds to one line with 「Show list」.

`@object-ui/app-shell` exports a product-neutral `SidebarFooterSlotProvider` (with its `SidebarFooterSlot` and `SidebarFooterSlotPlace` types; places `'sidebar' | 'phoneAppHome'`) that the console fills; the shell names no checklist. `@object-ui/i18n` replaces the per-setting checklist strings in all eleven packs. Added under `console.firstRunChecklist`: `showList`, `hideHere`, `organizationBasics.{title,todo,name,nameRequired,prefilled,save,saved}`, `pill.{label,count,aria}`. Removed from `console.firstRunChecklist` (no reader is left in the console; a consumer that indexed them reads the new keys instead): `showDoneSplit`, `confirm`, `prefilled`, `organizationName.{title,todo,action}`, `languageCountry.{title,todo,saved}`, `timezone.{title,todo,saved}`, `currency.{title,todo,saved}`.
30 changes: 24 additions & 6 deletions ui/apps/console/src/AppContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@

import { lazy, Suspense, useEffect, useMemo, type ReactNode } from 'react';
import { Route, useParams, useLocation, Navigate } from 'react-router-dom';
import { DefaultAppContent, ENVIRONMENT_SCOPE_QUERY, LauncherAppsProvider, LoadingFallback, LoadingScreen, SetupFirstPageSlotProvider, setupMetadataStudioPath, useAdapter } from '@object-ui/app-shell';
import { DefaultAppContent, ENVIRONMENT_SCOPE_QUERY, LauncherAppsProvider, LoadingFallback, LoadingScreen, SetupFirstPageSlotProvider, SidebarFooterSlotProvider, setupMetadataStudioPath, useAdapter, type SidebarFooterSlotPlace } from '@object-ui/app-shell';
import { AdapterCtx } from '@object-ui/react';
import { MePermissionsProvider, ServerReadScope, releaseMePermissionsRequest, startMePermissionsRequest } from '@object-ui/permissions';
import { createAuthenticatedFetch, useAuth } from '@object-ui/auth';
import type { DataSource } from '@object-ui/types';
import { LocalizationFetchProvider } from './LocalizationFetchProvider';
import { FirstRunChecklist } from './pages/settings/FirstRunChecklist';
import { FirstRunChecklistPill } from './pages/settings/FirstRunChecklistPill';
import { FirstRunChecklistProvider } from './pages/settings/firstRunChecklistState';
import { InAppFormRoute } from './components/InternalFormRoute';
import { APPROVAL_ACTION_OBJECT, APPROVAL_REQUEST_OBJECT, routeApprovalRecordReads } from './services/approvalRequestsDataSource';
import { studioLandingPath } from '@object-ui/app-shell';
Expand Down Expand Up @@ -422,12 +424,23 @@ export function ConsolePermissionsRequest(): null {
/**
* objectstack#36732 (item 5, option A) — an administrator's first-run
* checklist at the top of the Setup app's first page, now that the desktop's
* home page retired. The checklist decides who sees it (a session that may
* write the settings it lists) and hides once the list is done; this route
* sits under `ConsolePermissionsScope`, which answers the first.
* home page retired. Since objectstack#36739 this is the FULL list, done rows
* included, kept for looking back once it is finished. The checklist decides
* who sees it (a session that may write the settings it lists); this route
* sits under `ConsolePermissionsScope`, which answers that.
*/
function setupFirstPageChecklist() {
return <FirstRunChecklist placement="top" />;
return <FirstRunChecklist placement="setupPage" />;
}

/**
* objectstack#36739 — the administrator's 「Get started n/m」 pill at the bottom
* of every app's sidebar (after the app's menu on a phone), opening the
* first-run checklist in place. It stands aside for a member and once the
* required rows are done.
*/
function sidebarFooterPill(where: SidebarFooterSlotPlace) {
return <FirstRunChecklistPill where={where} />;
}

/**
Expand Down Expand Up @@ -486,7 +499,12 @@ export function ConsolePermissionsScope({ children }: { children: ReactNode }) {
drops an app the user's permission sets hide. One read for Home and
every app, so this common ancestor holds it, beside the answer above. */}
<LauncherAppsProvider endpoint={`${serverUrl}/api/v1/me/apps`} fetcher={authFetch}>
{children}
{/* objectstack#36739 — the first-run checklist's reads, made once for
every place it is drawn (the sidebar pill, Setup's first page,
Home), so moving between apps asks nothing again. */}
<FirstRunChecklistProvider>
<SidebarFooterSlotProvider value={sidebarFooterPill}>{children}</SidebarFooterSlotProvider>
</FirstRunChecklistProvider>
</LauncherAppsProvider>
</MePermissionsProvider>
);
Expand Down
Loading
Loading