Skip to content

⭐️⭐️⭐️ Open-source, self-hosted alternative to Linear and Plane. Project management and issue tracking where teams and AI agents work side by side to plan and ship products.

feat(web): a title for the sign-in form, and a workspace menu group below Settings (#612)

Crofffa68687d70f6
diff --git a/apps/web/AGENTS.md b/apps/web/AGENTS.md
index 36861b6f..a58f0cf4 100644
--- a/apps/web/AGENTS.md
+++ b/apps/web/AGENTS.md
@@ -23,7 +23,8 @@ Next.js App Router, SSR (not SPA). Tailwind v4 + shadcn/ui. See root `AGENTS.md`
page `/workspaces/:id/:sectionId` opens; that page answers 404 only once the workspace and
every query in flight have loaded, so a section that waits on a query of its own opens
from a direct link. Every section names its group: an `overview` one sits at the top of
- the menu, a `settings` one in the folding Settings group below, each in the order given.
+ the menu, a `settings` one in the folding Settings group below, a `history` one below that
+ group, each in the order given.
`/workspaces/:id` names no section and opens the first entry of the menu, so the order
also decides the page a workspace opens on.
`NoTeamStart` is the start page of an account with no team and no workspace it owns,
@@ -41,7 +42,8 @@ Next.js App Router, SSR (not SPA). Tailwind v4 + shadcn/ui. See root `AGENTS.md`
instance's own provider, on the sign-in screen and on the invite screen, where it gets the
invited address as `email`; here it adds nothing, while the hosted build offers a sign-in
through providers of its own. `SignInPage` is what `/login/<name>` shows, a sign-in page under a
- name of its own; here every name answers 404. A sign-in that comes back with a code the core does not
+ name of its own; here every name answers 404, while the hosted build can show the sign-in
+ form there under a title of its own (`AuthLoginForm`'s `title`). A sign-in that comes back with a code the core does not
know shows the text the build's messages give it under `auth.errors.codes.<code>`.
`GodSectionExtras` renders at the end of every god section page, by its slug, for settings the hosted build adds to an existing section; `WorkspaceSectionExtras`
does the same on a workspace's own settings pages (`general`, `managers`), with the
diff --git a/apps/web/src/ce/useWorkspaceSections.ts b/apps/web/src/ce/useWorkspaceSections.ts
index 03c413cc..4381702b 100644
--- a/apps/web/src/ce/useWorkspaceSections.ts
+++ b/apps/web/src/ce/useWorkspaceSections.ts
@@ -49,7 +49,7 @@ export default function useWorkspaceSections(
id: 'audit-log',
label: t('auditLog.title'),
icon: ScrollText,
- group: 'overview',
+ group: 'history',
Component: WorkspaceAuditLogPreview,
},
];
diff --git a/apps/web/src/features/auth/components/login/AuthLoginForm.tsx b/apps/web/src/features/auth/components/login/AuthLoginForm.tsx
index 3c2eb3f6..bbaab424 100644
--- a/apps/web/src/features/auth/components/login/AuthLoginForm.tsx
+++ b/apps/web/src/features/auth/components/login/AuthLoginForm.tsx
@@ -36,7 +36,8 @@ import { useRedirectError } from '../../hooks/useRedirectError';
// since they need neither field.
type Method = 'password' | 'link';
-export default function AuthLoginForm() {
+// `title` replaces "Sign in" on a sign-in page under a name of its own (/login/<name>).
+export default function AuthLoginForm({ title }: { title?: string }) {
const t = useTranslations('auth');
const [method, setMethod] = useState<Method>('password');
// With a password this is either an address or a username; a sign-in link can only
@@ -146,7 +147,7 @@ export default function AuthLoginForm() {
return (
<form onSubmit={onSubmit} className="p-6 md:p-8">
<FieldGroup>
- <AuthFormHeader title={t('login.title')} description={subtitle()} />
+ <AuthFormHeader title={title ?? t('login.title')} description={subtitle()} />
{passwordEnabled && (
<AuthLoginPasswordFields
diff --git a/apps/web/src/features/teams/components/workspace/WorkspaceSectionNav.tsx b/apps/web/src/features/teams/components/workspace/WorkspaceSectionNav.tsx
index 6665b56a..b98427dd 100644
--- a/apps/web/src/features/teams/components/workspace/WorkspaceSectionNav.tsx
+++ b/apps/web/src/features/teams/components/workspace/WorkspaceSectionNav.tsx
@@ -19,8 +19,8 @@ import {
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible';
// The overview sections at the top of the menu, then the settings folded into a group,
-// as the team menu folds its AI sections. With no overview to sit under there is nothing
-// to fold, and the settings are listed as they are.
+// as the team menu folds its AI sections, then the history below the group. With no
+// overview to sit under there is nothing to fold, and every section is listed as it is.
export default function WorkspaceSectionNav({ workspace }: { workspace: WorkspaceSummary }) {
const t = useTranslations('teams.workspace');
const pathname = usePathname();
@@ -37,7 +37,8 @@ export default function WorkspaceSectionNav({ workspace }: { workspace: Workspac
}));
const overview = items('overview');
const settings = items('settings');
- const entries = [...overview, ...settings];
+ const history = items('history');
+ const entries = [...overview, ...settings, ...history];
const active = entries.find((entry) => entry.href === pathname);
const activeId = active?.id ?? null;
// The workspace's own path opens the first entry of the menu.
@@ -49,7 +50,7 @@ export default function WorkspaceSectionNav({ workspace }: { workspace: Workspac
const settingsOpen = toggled ?? settings.some((entry) => entry.id === activeId);
if (overview.length === 0) {
- return <SectionNav sections={settings} activeId={activeId} label={workspace.name} />;
+ return <SectionNav sections={entries} activeId={activeId} label={workspace.name} />;
}
return (
@@ -72,6 +73,9 @@ export default function WorkspaceSectionNav({ workspace }: { workspace: Workspac
</CollapsibleContent>
</Collapsible>
)}
+ {history.length > 0 && (
+ <SectionNav sections={history} activeId={activeId} label={workspace.name} />
+ )}
</div>
);
}
diff --git a/apps/web/src/features/teams/types/workspaceSection.ts b/apps/web/src/features/teams/types/workspaceSection.ts
index 6d4631e6..f81a83cf 100644
--- a/apps/web/src/features/teams/types/workspaceSection.ts
+++ b/apps/web/src/features/teams/types/workspaceSection.ts
@@ -1,13 +1,14 @@
import type { ComponentType } from 'react';
import type { LucideIcon } from 'lucide-react';
-export const WORKSPACE_SECTION_GROUPS = ['overview', 'settings'] as const;
+export const WORKSPACE_SECTION_GROUPS = ['overview', 'settings', 'history'] as const;
export type WorkspaceSectionGroup = (typeof WORKSPACE_SECTION_GROUPS)[number];
// An entry in a workspace's settings menu, opened at workspacePath(workspaceId, id). The
// core's entries have routes of their own; one the hosted build adds carries its page in
-// `Component`. The menu lists what the workspace shows before what is set in it.
+// `Component`. The menu lists what the workspace shows, then what is set in it, then its
+// history.
export interface WorkspaceSection {
id: string;
label: string;