fix(editor): stop highlighting start.input as blue when block is not connected to starter#4054
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview This removes Reviewed by Cursor Bugbot for commit 4940abc. Configure here. |
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
…connected to starter
5302603 to
4940abc
Compare
|
@greptile |
|
@cursor review |
Greptile SummaryThis PR fixes a UI highlighting bug where Confidence Score: 5/5Safe to merge — a minimal, well-scoped change that correctly moves Both changed lines are simple set literal updates; all downstream consumers already fall through to No files require special attention.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text.tsx | Removes start from the local SYSTEM_PREFIXES set so <start.input> only highlights when the starter block is an actual ancestor; logically correct but maintains a duplicated constant instead of importing from the canonical source. |
| apps/sim/lib/workflows/sanitization/references.ts | Removes start from SYSTEM_REFERENCE_PREFIXES; all consumers that check this set fall through to accessiblePrefixes.has(normalizedPrefix), which will include start when the starter block (name "Start") is a real ancestor, so the fix is consistent. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["Reference token detected"] --> B{highlightAll?}
B -- Yes --> H[Highlight blue]
B -- No --> C{"prefix in SYSTEM_PREFIXES?\nloop / parallel / variable"}
C -- Yes --> H
C -- No --> D{prefix in accessiblePrefixes?}
D -- Yes --> H
D -- No --> E[No highlight / plain text]
F["useAccessibleReferencePrefixes()"] --> G{Starter block\nan ancestor via edges?}
G -- Yes --> I["normalizeName = 'start'\nadded to accessiblePrefixes"]
G -- No --> J["'start' absent from accessiblePrefixes"]
I --> D
J --> D
Reviews (1): Last reviewed commit: "fix(editor): stop highlighting start.inp..." | Re-trigger Greptile
| } | ||
|
|
||
| const SYSTEM_PREFIXES = new Set(['start', 'loop', 'parallel', 'variable']) | ||
| const SYSTEM_PREFIXES = new Set(['loop', 'parallel', 'variable']) |
There was a problem hiding this comment.
Duplicated constant diverges from canonical source
SYSTEM_PREFIXES here is a local copy of SYSTEM_REFERENCE_PREFIXES from references.ts — this PR keeps them in sync, but they can drift again with future changes. Since splitReferenceSegment is already imported from that module, importing SYSTEM_REFERENCE_PREFIXES directly removes the duplication.
| const SYSTEM_PREFIXES = new Set(['loop', 'parallel', 'variable']) | |
| import { splitReferenceSegment, SYSTEM_REFERENCE_PREFIXES as SYSTEM_PREFIXES } from '@/lib/workflows/sanitization/references' |
Then delete the local const SYSTEM_PREFIXES = new Set(...) declaration entirely.
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 4940abc. Configure here.
…connected to starter (#4054)
* fix(billing): skip billing on streamed workflows with byok * Simplify logic * Address comments, skip tokenization billing fallback * Fix tool usage billing for streamed outputs * fix(webhook): throw webhook errors as 4xxs (#4050) * fix(webhook): throw webhook errors as 4xxs * Fix shadowing body var --------- Co-authored-by: Theodore Li <theo@sim.ai> * feat(enterprise): cloud whitelabeling for enterprise orgs (#4047) * feat(enterprise): cloud whitelabeling for enterprise orgs * fix(enterprise): scope enterprise plan check to target org in whitelabel PUT * fix(enterprise): use isOrganizationOnEnterprisePlan for org-scoped enterprise check * fix(enterprise): allow clearing whitelabel fields and guard against empty update result * fix(enterprise): remove webp from logo accept attribute to match upload hook validation * improvement(billing): use isBillingEnabled instead of isProd for plan gate bypasses * fix(enterprise): show whitelabeling nav item when billing is enabled on non-hosted environments * fix(enterprise): accept relative paths for logoUrl since upload API returns /api/files/serve/ paths * fix(whitelabeling): prevent logo flash on refresh by hiding logo while branding loads * fix(whitelabeling): wire hover color through CSS token on tertiary buttons * fix(whitelabeling): show sim logo by default, only replace when org logo loads * fix(whitelabeling): cache org logo url in localstorage to eliminate flash on repeat visits * feat(whitelabeling): add wordmark support with drag/drop upload * updated turbo * fix(whitelabeling): defer localstorage read to effect to prevent hydration mismatch * fix(whitelabeling): use layout effect for cache read to eliminate logo flash before paint * fix(whitelabeling): cache theme css to eliminate color flash before org settings resolve * fix(whitelabeling): deduplicate HEX_COLOR_REGEX into lib/branding and remove mutation from useCallback deps * fix(whitelabeling): use cookie-based SSR cache to eliminate brand flash on all page loads * fix(whitelabeling): use !orgSettings condition to fix SSR brand cache injection React Query returns isLoading: false with data: undefined during SSR, so the previous brandingLoading condition was always false on the server — initialCache was never injected into brandConfig. Changing to !orgSettings correctly applies the cookie cache both during SSR and while the client-side query loads, eliminating the logo flash on hard refresh. * fix(editor): stop highlighting start.input as blue when block is not connected to starter (#4054) * fix: merge subblock values in auto-layout to prevent losing router context (#4055) Auto-layout was reading from getWorkflowState() without merging subblock store values, then persisting stale subblock data to the database. This caused runtime-edited values (e.g. router_v2 context) to be overwritten with their initial/empty values whenever auto-layout was triggered. * fix(whitelabeling): eliminate logo flash by fetching org settings server-side (#4057) * fix(whitelabeling): eliminate logo flash by fetching org settings server-side * improvement(whitelabeling): add SVG support for logo and wordmark uploads * skelly in workspace header * remove dead code * fix(whitelabeling): hydration error, SVG support, skeleton shimmer, dead code removal * fix(whitelabeling): blob preview dep cycle and missing color fallback * fix(whitelabeling): use brand-accent as color fallback when workspace color is undefined * chore(whitelabeling): inline hasOrgBrand --------- Co-authored-by: Theodore Li <theo@sim.ai>
Summary
startfrom hardcoded system prefixes that always highlight as blue<start.input>now only highlights blue when the block is actually connected to the starter block via edgesloop,parallel, andvariableremain as system prefixes since they are contextual constructs handled differentlyType of Change
Testing
Tested manually
Checklist