fix(OUT-4032): gate actions widget on content only - #235
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Drop the never-saved timestamp check: a segment duplicated from a customized default is a fresh insert (createdAt === updatedAt) yet its content is already personalized, so the timestamp check wrongly hid the card. Rely on isDefaultContent alone. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2a9deb9 to
8d8c2ed
Compare
Greptile SummaryThe PR updates the seeded client-home copy and banner, changes the subheading database default, and gates ActionsCard solely by comparison with the current default body HTML.
Confidence Score: 4/5The PR should not merge until existing untouched homes containing the previous default body are kept from showing ActionsCard. The content-only gate compares persisted content against only the newly introduced default string, so historical untouched settings take the customized-content branch at every ActionsCard render site. Files Needing Attention: src/features/editor/utils/content.ts and src/features/settings/constants.ts Important Files Changed
Reviews (1): Last reviewed commit: 2a9deb9 | Re-trigger Greptile |
| @@ -9,16 +9,3 @@ export const isBlankContent = (html?: string): boolean => { | |||
|
|
|||
| // True when the body still matches the seeded default copy. | |||
| export const isDefaultContent = (html?: string): boolean => html === defaultContent | |||
There was a problem hiding this comment.
There was a problem hiding this comment.
This is intended. The change takes place only for newly created workspace.
There was a problem hiding this comment.
Got it, that makes sense. Existing workspaces with the old default HTML will show ActionsCard, and only newly created workspaces get the new gating behavior. Thanks for clarifying!
Tip: You can customize Greptile's behavior for this repo with .greptile/rules.md and .greptile/config.json.
Linear: OUT-4032
Follow-up to the merged #233. Net change vs
mainis the content-only gating fix for the "Your actions" widget.Changes
ActionsCardon!isDefaultContent(content)at all three render sites (IU editor, IU preview, CU client), dropping the earliercreatedAt === updatedAt"never saved" check.isNeverSaved/isDefaultClientHomehelpers and the timestamp store reads.Why
The timestamp check was wrong for segments. A new segment duplicates the workspace's default settings via
duplicateDefaultSettings→createForSegment, which is a freshINSERT, socreatedAt === updatedAteven when the copiedcontentis already personalized. That madeisNeverSavedtrue and wrongly hid the actions widget on customized segment homes. Content comparison is the correct signal.Testing Criteria
pnpm typecheck— passes.pnpm lint— passes, 0 warnings.ActionsCard(was hidden before this fix). Fresh/untouched default home still hides it. Loom to be added.Impact & Surface Area of Change
ActionsCardon the client home (IU editor, IU preview, CU client). No data/schema/API changes.content === defaultContent; the single-linedefaultContent(from OUT-4032: update default client home copy #233) keeps this reliable after TipTap re-serialization.