Repository navigation
feat(fe): an If can follow a list through its count (#264) - #268
Merged
Merged
Conversation
Ancung, 11 Nov: after "Read the calendar", If was greyed out with "Add a check or a website first", which read like a bug since a step was right there. The real reason: an If compares a number or a text, and the calendar (like the inbox, free time, Notion rows, Sheets values and Zoom meetings) gives a list. The palette, the phone's "Add a block" and a way's picker now say which: "Read the calendar gives a list, which an If can't compare yet", or, with nothing before it, "Add a step that gives a number or text first". Making it possible (a count on list tools, and an If on an Ask step's answer) needs the engine and is proposed on #264. Tests: typecheck, lint, vitest 272/272 (new: the list case, the empty case, the path-ends case). Not checked in a browser. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The engine now returns a count beside every list (#265), so the Builder offers "Number of events", "Number of emails", rows, free slots, meetings and pages found in an If's "Look at", saved as {{steps.id.count}}. "Read the calendar, then If number of events is more than 0, then Ask, then Email me" can be built now. An If on an Ask step's answer is left out: the engine compares exact text only. The locked-If message drops its "gives a list" case, which can't happen any more. Tests: lint, typecheck, vitest 273/273 (new: count offered and saved as steps.c.count, never .length). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Merged with Axel's approval; @AncungAulia two small things for a later PR, nothing blocking:
Could you also try it once on the hosted demo: Read the calendar → If number of events > 0? @Lin1er no backend change. |
Contributor
|
Live on the hosted demo:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@Lexirieru The FE part of #264, on top of the engine's #265.
What changed
{ left: "{{steps.<node>.count}}", op: "gt", right: 0 }, as you asked on feat(engine): count on list tools so a Builder If can test "Number of events > 0" (#264) #265, never.length.{Calendar events}) → Email me; otherwise it stops. The card reads "If number of events is more than 0".ifLockedWhy). Its "gives a list" case was dropped, since a list now always has a count.apps/fe/CLAUDE.mdupdated.Tests (local, on
main8b9f947)bun run lint,bun run typecheck,bun run build: pass.bun run test: 273/273. New: an If after Read the calendar is allowed, "Number of events" is the only comparable field, the canvas carries{{steps.c.count}}and no.length, and it opens again.Closes #264 once it's in, unless you want to keep it open for the Ask-answer If.
🤖 Generated with Claude Code