mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-30 17:14:54 +01:00
feat(ui): show the Cloud Slack invitation in the workspace sidebar (#22702)
## Thinking Path > - Teams use Paperclip to manage agents and their work. > - Hosted teams can have a private Slack channel with the Paperclip team. > - A workspace member needs to know whether they can open the channel or still need the owner's invitation. > - Cloud supplies that information for the selected organization. > - This change puts a Slack button in the sidebar footer. It opens a dialog with the next action. ## Linked Issues or Issue Description **Subsystem affected** Workspace sidebar and the Cloud onboarding browser journey. **Problem or motivation** After setup, a user can lose track of the invitation to their organization's private feedback channel. **Proposed solution** Show the invitation status in a dialog. Offer a channel link when Cloud confirms the connection. **Roadmap alignment** This extends the existing hosted workspace navigation. The roadmap has no separate item for this shortcut. ## What Changed - Both sidebar variants use the existing portfolio request to show the Slack shortcut when Cloud supplies invitation details. - The icon uses grayscale at rest and brand colors on hover or keyboard focus. The button has an accessible name and a tooltip. - The Cloud onboarding journey selects Codex and confirms feedback intent when the first-account welcome appears. - Storybook covers pending and connected channels. ## Verification - The sidebar suite passed 36 tests. The Cloud onboarding journey suite passed 10 tests covering both the current and previous gateway layouts. - The Storybook catalog regenerated successfully. - In a local browser run, a fresh user completed signup, connected a test model, hired an agent, opened its chat, and opened and dismissed the Slack invitation. The test used a local Slack fixture. - The incremental verifier selected broad CI coverage for the runner journey change. All applicable checks passed on `ea9779abda`. A GitHub runner shut down during a server test shard. The shard and final verification gate passed on retry. [CI run](https://github.com/paperclipai/paperclip/actions/runs/45276376121/attempts/2) · [Greptile review (5/5)](https://github.com/paperclipai/paperclip/pull/22702#issuecomment-7115303606) ## Risks An older Cloud service can omit the optional feedback field. In that case, the sidebar keeps the existing layout. Cloud controls the channel destination and the invitation state. ## Model Used OpenAI GPT-6 in Codex, with repository tools and browser verification. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [x] All Paperclip CI gates are green - [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge --------- Co-authored-by: Scott Tong <1504818+scotttong@users.noreply.github.com> Co-authored-by: Paperclip <noreply@paperclip.ing>
This commit is contained in:
11 files changed
+190
-57
No files matched your search
@@ -13,7 +13,8 @@ import { Link } from "@/lib/router";
|
||||
import { authApi } from "@/api/auth";
|
||||
import { queryKeys } from "@/lib/queryKeys";
|
||||
import { useCloudInstance } from "@/hooks/useCloudInstance";
|
||||
import { useCloudInviteUrl } from "@/hooks/useCloudInviteUrl";
|
||||
import { useCloudSidebarLinks } from "@/hooks/useCloudSidebarLinks";
|
||||
import { SidebarSlackFeedback } from "./SidebarSlackFeedback";
|
||||
import { useCanInviteCompanyMembers } from "@/hooks/useCompanyInviteAccess";
|
||||
import { useHiddenSettings } from "@/hooks/useHiddenSettings";
|
||||
import { useSignOut } from "@/hooks/useSignOut";
|
||||
@@ -129,7 +130,7 @@ export function SidebarAccountMenu({
|
||||
// On Cloud the shortcut exists only for the current stack's owner/admin and
|
||||
// only once the stack metadata is known; the in-app Invites tab is never a
|
||||
// fallback there because it drives a different invitation flow.
|
||||
const cloudInviteUrl = useCloudInviteUrl();
|
||||
const { inviteUrl: cloudInviteUrl, slackFeedback } = useCloudSidebarLinks(cloud);
|
||||
// Self-hosted invites need the `users:invite` grant. Offer the shortcut only
|
||||
// to boards with role-default access (company owner/admin/operator,
|
||||
// instance admins, local boards). The server checks the actual grants.
|
||||
@@ -275,6 +276,7 @@ export function SidebarAccountMenu({
|
||||
</FlyoutOptions>
|
||||
</FlyoutContent>
|
||||
</Popover>
|
||||
{slackFeedback && <SidebarSlackFeedback feedback={slackFeedback} className="hover:bg-sidebar-accent" />}
|
||||
{!isCloud ? (
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
|
||||
Reference in new issue
Block a user