From 45425bcb68f8c9994b47038e05b62caf9237c4c7 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 5 Nov 2026 00:50:11 +0000 Subject: [PATCH 1/4] wip(app-shell): personal view conditions as Filter panel rows, save to the view (#30073) Claude-Session: https://claude.ai/code/session_01QSeKYpFBMr917PmVkG9up7 Co-authored-by: Claude --- .../src/views/ListPersonalizedMarker.tsx | 24 +++++- .../app-shell/src/views/ObjectView.tsx | 75 ++++++++++++++++-- .../src/views/objectViewListRenderer.tsx | 21 ++++- .../src/views/objectViewListUrlState.ts | 15 ++++ .../app-shell/src/views/personalViews.ts | 79 ++++++++++++++++++- ui/packages/plugin-list/src/ListView.tsx | 26 +++++- 6 files changed, 222 insertions(+), 18 deletions(-) diff --git a/ui/packages/app-shell/src/views/ListPersonalizedMarker.tsx b/ui/packages/app-shell/src/views/ListPersonalizedMarker.tsx index 6a241e3b002..04df40a5f0c 100644 --- a/ui/packages/app-shell/src/views/ListPersonalizedMarker.tsx +++ b/ui/packages/app-shell/src/views/ListPersonalizedMarker.tsx @@ -9,6 +9,10 @@ * (`useObjectViewListUrlState`'s `handleResetView`). Nothing here is * configurable: no metadata key or option reaches it. * + * On one of the reader's own views (objectstack#30073) it also offers 保存 + * (`onSave`): the list on screen becomes the view's stored body. Edits not + * saved stay the reader's temporary list state, never written to the view. + * * Below `sm` the trigger is an icon alone (named by its `aria-label`), so on a * narrow row it never pushes the view name out. */ @@ -17,7 +21,7 @@ import { useState } from 'react'; import { Button, Popover, PopoverContent, PopoverTrigger, cn } from '@object-ui/components'; import { useObjectTranslation } from '@object-ui/i18n'; import type { ListViewProps } from '@object-ui/plugin-list'; -import { RotateCcw, UserPen } from 'lucide-react'; +import { RotateCcw, Save, UserPen } from 'lucide-react'; /** One part of a list that can differ from its view (`ListView`'s vocabulary). */ export type ListPersonalizationPart = Parameters>[0][number]; @@ -40,10 +44,13 @@ const LIST_PERSONALIZATION_PART_ORDER: readonly ListPersonalizationPart[] = [ export function ListPersonalizedMarker({ parts, onReset, + onSave, className, }: { parts: ReadonlyArray; onReset: () => void; + /** Save the list on screen into the open view; offered only for a view the reader owns and may update. */ + onSave?: () => void; className?: string; }) { const { t } = useObjectTranslation(); @@ -97,6 +104,21 @@ export function ListPersonalizedMarker({ ))} + {onSave ? ( + + ) : null}

{t('console.objectView.resetViewTitle')}