Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

fix(ui): add plain-language tooltips to inherited read-boundary notices

M4ef973009b75
diff --git a/control-ui/components/GfsGrantPanel.tsx b/control-ui/components/GfsGrantPanel.tsx
index b9da5497f..9251c4eee 100644
--- a/control-ui/components/GfsGrantPanel.tsx
+++ b/control-ui/components/GfsGrantPanel.tsx
@@ -144,6 +144,11 @@ export function GfsGrantPanel({ resource }: GfsGrantPanelProps): React.JSX.Eleme
: inheritedAccessCoverage === 'acl-limited'
? 'Sharing details on some parent folders are not visible to you.'
: 'Inherited access could not be loaded. Members with access from a parent folder may be missing.'
+ // Native tooltip explaining the read-boundary notice in plain language.
+ const inheritedAccessNoticeTitle =
+ inheritedAccessCoverage === 'read-boundary'
+ ? 'Some folders above this one are not visible to you. People may still have access through them, but we cannot show who.'
+ : undefined
const inheritedAccessRequest = useRef(0)
const inheritedAccessController = useRef<AbortController | null>(null)
// Pending parent-folder confirmation (role change or removal) for a member
@@ -936,7 +941,11 @@ export function GfsGrantPanel({ resource }: GfsGrantPanelProps): React.JSX.Eleme
<h4>People with access</h4>
</div>
{inheritedAccessFailed ? (
- <p role="status" className="cu-gfs-existing-access__notice">
+ <p
+ role="status"
+ className="cu-gfs-existing-access__notice"
+ title={inheritedAccessNoticeTitle}
+ >
{inheritedAccessNotice}
</p>
) : null}
diff --git a/control-ui/components/__tests__/GfsGrantPanel.inherited.test.tsx b/control-ui/components/__tests__/GfsGrantPanel.inherited.test.tsx
index a19d78ae7..74b2ce28f 100644
--- a/control-ui/components/__tests__/GfsGrantPanel.inherited.test.tsx
+++ b/control-ui/components/__tests__/GfsGrantPanel.inherited.test.tsx
@@ -807,6 +807,26 @@ describe('GfsGrantPanel inherited access', () => {
}
)
+ // The read-boundary notice carries a plain-language hover explainer.
+ it('titles the read-boundary notice with a plain-language explainer', async () => {
+ const actual = await vi.importActual<typeof import('@lib/api')>('@lib/api')
+ const text = JSON.stringify({ error: 'request_failed', message: 'parent read failed' })
+ const error = actual.formatApiError(new Response(text, { status: 403 }), text)
+ mockGetGfsResourceByPath.mockImplementation(async (_drive, path) => {
+ if (path === '/team-docs') return byPathView(FOLDER_ID, 'team-docs')
+ throw error
+ })
+ renderPanel()
+
+ const existing = await screen.findByRole('region', { name: 'People with access' })
+ const notice = await within(existing).findByText(
+ 'There may be access from parent folders you cannot see.'
+ )
+ expect(notice.closest('.cu-gfs-existing-access__notice')?.getAttribute('title')).toBe(
+ 'Some folders above this one are not visible to you. People may still have access through them, but we cannot show who.'
+ )
+ })
+
it('merges the same subject inherited through several folders into one row with the strongest source', async () => {
mockGetGfsResourceByPath.mockImplementation(async (_drive, path) => {
if (path === '/team-docs') return byPathView(FOLDER_ID, 'team-docs')
diff --git a/control-ui/package-lock.json b/control-ui/package-lock.json
index 39cfaf1b9..6d25e9544 100644
--- a/control-ui/package-lock.json
+++ b/control-ui/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-ui",
- "version": "0.1.739",
+ "version": "0.1.740",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-ui",
- "version": "0.1.739",
+ "version": "0.1.740",
"dependencies": {
"@clerum/display-field": "file:../packages/display-field",
"@clerum/frontend-components": "file:../packages/frontend-components",
diff --git a/control-ui/package.json b/control-ui/package.json
index cf97cc7a7..0178f19a3 100644
--- a/control-ui/package.json
+++ b/control-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-ui",
- "version": "0.1.739",
+ "version": "0.1.740",
"private": true,
"scripts": {
"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",
diff --git a/desktop-app/ui/src/components/Common/StatusBanner/index.tsx b/desktop-app/ui/src/components/Common/StatusBanner/index.tsx
index 4b185693b..1c98cd84a 100644
--- a/desktop-app/ui/src/components/Common/StatusBanner/index.tsx
+++ b/desktop-app/ui/src/components/Common/StatusBanner/index.tsx
@@ -1,11 +1,19 @@
import { joinClasses } from '@lib/classNames'
import type { StatusBannerProps } from './types'
-export function StatusBanner({ text, children, tone, leadingIcon, compact }: StatusBannerProps) {
+export function StatusBanner({
+ text,
+ children,
+ tone,
+ leadingIcon,
+ compact,
+ title,
+}: StatusBannerProps) {
const icon =
leadingIcon || (tone === 'success' ? '●' : tone === 'error' ? '!' : tone === 'warn' ? '⚠' : 'i')
return (
<div
+ title={title}
className={joinClasses('status-banner', `tone-${tone}`, compact && 'status-banner--compact')}
>
<span className="status-dot">{icon}</span>
diff --git a/desktop-app/ui/src/components/Common/StatusBanner/types.ts b/desktop-app/ui/src/components/Common/StatusBanner/types.ts
index 181689b05..50853ac8d 100644
--- a/desktop-app/ui/src/components/Common/StatusBanner/types.ts
+++ b/desktop-app/ui/src/components/Common/StatusBanner/types.ts
@@ -8,6 +8,8 @@ export type StatusBannerProps = {
children?: ReactNode
tone: Tone
leadingIcon?: string
+ /** Native tooltip for the whole banner, icon included. */
+ title?: string
/** Tighter padding/font for inline header use (D.5). */
compact?: boolean
}
diff --git a/desktop-app/ui/src/gfs/GfsGrantList/index.tsx b/desktop-app/ui/src/gfs/GfsGrantList/index.tsx
index 92f740bb8..dd50a301b 100644
--- a/desktop-app/ui/src/gfs/GfsGrantList/index.tsx
+++ b/desktop-app/ui/src/gfs/GfsGrantList/index.tsx
@@ -94,6 +94,7 @@ export function GfsGrantList({
mergeInherited = false,
loading = false,
derivationNotice = null,
+ derivationNoticeHint = null,
error = null,
shareError = null,
agents,
@@ -148,7 +149,13 @@ export function GfsGrantList({
return (
<>
- {derivationNotice ? <StatusBanner tone="info" text={derivationNotice} /> : null}
+ {derivationNotice ? (
+ <StatusBanner
+ tone="info"
+ text={derivationNotice}
+ title={derivationNoticeHint ?? undefined}
+ />
+ ) : null}
{hasAnyError ? (
<div className="da-gfs-grant-list__errors" data-testid="gfs-access-list-error">
{error ? (
diff --git a/desktop-app/ui/src/gfs/GfsGrantList/types.ts b/desktop-app/ui/src/gfs/GfsGrantList/types.ts
index d129111b8..bed053221 100644
--- a/desktop-app/ui/src/gfs/GfsGrantList/types.ts
+++ b/desktop-app/ui/src/gfs/GfsGrantList/types.ts
@@ -42,6 +42,8 @@ export interface GfsGrantListProps {
* claim is suppressed while this is set.
*/
derivationNotice?: string | null
+ /** Native tooltip explaining the notice in plain language. */
+ derivationNoticeHint?: string | null
/**
* Mapped list-load failure. Severity 'quiet' (manage_acl_required) renders an
* informational banner instead of the list; 'error' renders an error banner.
diff --git a/desktop-app/ui/src/pages/FilesPage.tsx b/desktop-app/ui/src/pages/FilesPage.tsx
index 981a3e168..e1c2b1dda 100644
--- a/desktop-app/ui/src/pages/FilesPage.tsx
+++ b/desktop-app/ui/src/pages/FilesPage.tsx
@@ -110,6 +110,8 @@ const INHERITED_DERIVATION_NOTICE =
// a privacy boundary and an ACL-limited ancestor are normal states, not load
// failures, so they must not wear the failure notice above — and vice versa.
const INHERITED_READ_BOUNDARY_NOTICE = 'There may be access from parent folders you cannot see.'
+const INHERITED_READ_BOUNDARY_HINT =
+ 'Some folders above this one are not visible to you. People may still have access through them, but we cannot show who.'
const INHERITED_ACL_LIMITED_NOTICE =
'Sharing details on some parent folders are not visible to you.'
@@ -566,6 +568,10 @@ export function FilesPage({
: ctrl.inheritedCoverage === 'unavailable'
? INHERITED_DERIVATION_NOTICE
: null
+ const inheritedAccessNoticeHint =
+ !ctrl.inheritedAccessError && ctrl.inheritedCoverage === 'read-boundary'
+ ? INHERITED_READ_BOUNDARY_HINT
+ : null
const currentPreviewAvailable = currentIsFile && isGfsPreviewFile(current?.name ?? '')
const droppedUploadRestriction = useMemo(() => {
if (!current) {
@@ -2461,6 +2467,7 @@ export function FilesPage({
<GfsGrantList
agents={agentSubjects}
derivationNotice={inheritedAccessNotice}
+ derivationNoticeHint={inheritedAccessNoticeHint}
error={grantsError}
inheritedItems={ctrl.inheritedAccess}
items={ctrl.grants}
diff --git a/desktop-app/ui/src/pages/__tests__/FilesPage.test.tsx b/desktop-app/ui/src/pages/__tests__/FilesPage.test.tsx
index fb7c03dfd..c7909dfed 100644
--- a/desktop-app/ui/src/pages/__tests__/FilesPage.test.tsx
+++ b/desktop-app/ui/src/pages/__tests__/FilesPage.test.tsx
@@ -1930,6 +1930,13 @@ describe('FilesPage', () => {
expect(
within(manageDialog).getByText('There may be access from parent folders you cannot see.')
).toBeTruthy()
+ // Hovering the banner (info icon or text) explains the notice in plain language.
+ const boundaryBanner = within(manageDialog)
+ .getByText('There may be access from parent folders you cannot see.')
+ .closest('.status-banner')
+ expect(boundaryBanner?.getAttribute('title')).toBe(
+ 'Some folders above this one are not visible to you. People may still have access through them, but we cannot show who.'
+ )
// A boundary is not a load failure — the failure copy must not appear.
expect(within(manageDialog).queryByText(/could not be loaded/)).toBeNull()
// Known authorized sources stay editable (no blanket partial read-only).