Features

Path lookup

Every record a record reaches through any chain of links, to any depth, and the ones that reach nothing.

Pick a target table, not a chain of fields. A path lookup follows every link that leads there, in the direction each link depends, through as many tables as it takes. Filter it by "is empty" to find, say, the emails not used on a platform yet, whether its accounts signed up directly, through GitHub or through Google.

  • Choose the target table and optional conditions on it, such as Platform is xxx
  • Every link on a path to the target is walked, including links added later, at any depth and through loops
  • Each link says which side depends on the other, so the walk never doubles back into unrelated records
  • "Is empty" and "is not empty" filters over the whole table, and a Why for each result that shows the chain
  • Tables that were never linked join in too: set a text column of emails to match the Emails table once, and the walk treats equal values as a link
  • In the REST API and over MCP; nothing is stored, so edits cost nothing extra

45 of 45 automated tests pass in 6 files (2026-10-25).

Emails not used on a platform, through any sign-up path
Emails not used on a platform, through any sign-up path
Path lookup settings
Path lookup settings
Why: the chain that reaches a result
Why: the chain that reaches a result
Path lookup values in the grid
Path lookup values in the grid
A text column set to match the Emails table
A text column set to match the Emails table
A matched value opens its record
A matched value opens its record

Verification record

The test method and results below are the project's own record, kept next to the code and published unedited.

Path lookup: verification record

Date: 2026-10-24, value matches added 2026-10-25. Feature: path lookup fields, link dependency directions, and value matches (text columns that connect to another table without a link).

What was tested

  • A new field type, Path lookup: pick a target table (and optional conditions on it), and each record gets every target record it reaches through any chain of links, to any depth, as clickable records.
  • Link dependency directions: each link pair says which side depends on the other. Links made before this feature get a direction from the side they were created on, with no migration; a pair can be flipped or marked “Not a dependency”, always on both fields together.
  • Which links are walked: every link pair on some path from the field’s table to the target, minus the ones the field leaves out. A link added later that connects the two tables is walked without editing the field.
  • “Is empty” and “is not empty” filters on the field, answered by one walk for the whole column, and refused (422) rather than answered partly when the walk hits a limit.
  • “Why”: for any result, the chain of records that reaches it.
  • REST API (read values, 422 on writes, an endpoint that explains a result), MCP (create, describe, read, filter), and the field dialog, grid, filter editor and record view.
  • Value matches: a text, email, URL or phone column set once to match a column of another table. Equal values (ignoring case and spaces around them) connect records without a link; path lookups walk them like links, matched values open the matched record, and the column stays ordinary text.

How

  • Worker integration tests (Vitest in workerd with real Durable Objects and SQLite), in test/worker/path-lookup.test.ts:

    • The starting question: emails, GitHub accounts registered with an email, platform accounts that sign in with GitHub, sign in with Google or sign up with an email directly; the field “accounts on platform xxx” and its “is empty” filter list exactly the unused emails.
    • A new table and link added after the field (an Apple sign-in) are followed without changing the field.
    • Direction: an email whose recovery email is used on xxx does not count as used itself (walking links both ways would count it); the reverse direction does pick up what depends on it; “Not a dependency” removes the link on both sides.
    • Links saved before directions existed: the direction comes from the side the link was made on; flipping one side flips the other.
    • Loops and depth: nested lists that include each other in a loop, a two-table loop A to B to A, and a maximum depth; results equal the closure worked out by hand.
    • Freshness: changing a platform, removing a link, deleting a GitHub account and adding an account each show on the next read; rows returned by a write carry path values; open views of affected tables are told to reload, unrelated writes reload nothing.
    • Limits: with the record limit lowered, cells are marked incomplete and the filter fails with 422; a cell holds at most 100 records and reports the full count.
    • “Why”: every hop of the returned chain is a real link.
    • Broken field: deleting the only link to the target leaves empty cells and a filter error that names the reason, not a crash.
    • Checks: the field cannot be written, sorted, grouped, summarized, used in formulas or made the primary field; target conditions must use target fields.
  • MCP and REST (test/worker/path-lookup-api.test.ts): create the field by table and field names, describe it with the links it walks, read values, filter by empty, refuse eq, sorts and writes, explain a result over REST (404 for a record that is not a result), and the app’s own explain route.

  • UI check with Playwright against wrangler dev: the starting question built in a fresh base, the field created from the field dialog, the filter set from the Filter panel, “Why” and opening a result from the record view, and a change made by another client.

  • Bench: /api/_bench/paths_seed builds the shape of a synthetic account graph (50,000 emails, 20,000 GitHub and 15,000 Google accounts registered with an email, 150,000 accounts on 20 platforms signed in through one of them, recovery emails on 30% of emails, about 200,000 links), then /api/_bench/time runs each operation 7 times.

  • Value matches (test/unit/matches.test.ts, test/worker/value-match.test.ts, test/worker/value-match-api.test.ts):

    • Comparison: " Alice@X.com " equals alice@x.com, Ä equals ä, blank values match nothing; columns not set to match never connect, even with equal values.
    • The value indexes: built for both sides when a match is set, kept in step with new, edited and deleted rows, untouched by writes to other columns, and built in the background for tables over 2,000 rows, with edits during the build leaving exactly one correct entry per record. Removing the match, deleting either column or either table leaves nothing behind.
    • Paths: the starting question with a Twitter table that names emails as text; direction, “Not a dependency” and leaving the match out of a path lookup; edits on either side show on the next read; while the index is being built, cells say “Incomplete” and filters are refused instead of undercounting.
    • A match whose column is deleted or stops being text keeps its setting, other edits to the field still save, and it works again when the column is text again; the index is rebuilt after a type conversion has written the values.
    • Matched records on the row (at most 100), “Why” naming the matching column, REST and MCP (matches, match: true in the explanation, set and remove over MCP).
  • UI check with Playwright against wrangler dev: a Twitter table with emails as text, the match set from the field dialog, values that turn into links, a value with two matching emails, a value with none, a path lookup on Emails through the match, “Why”, the “is empty” filter, another client’s change, and the dialog at phone width.

Results

Tests: 20 of 20 passed in 3 files (2026-10-24); value matches 25 of 25 in 3 more files (2026-10-25). The whole suite: 727 of 727, typecheck and build pass.

Bench (local wrangler dev, Apple M5 Pro, Node v24.18.1; local numbers, not production; medians of 7 runs with the request overhead of an empty call subtracted):

Action ms Target
“Is empty” filter on 50,000 emails for one platform, cache empty 138 under 300
The same filter cached, plus the first page of 100 rows 30
A grid page of 100 emails with their path lookup cells 22 under 50
Add an account, then the same filter (the write empties the cache) 176

The filter found 8,882 of 50,000 emails used on the platform. A recursive SQL query on an independently generated graph of the same shape found 8,862, and walking the links both ways there counted 11,747 (33% more), which is why the walk follows link directions.

Value matches, on the same graph with the 20,000 GitHub accounts naming their email as text in a column set to match Emails.Address instead of a link (paths_seed?match=1, the same random draws), measured in one run against the link version (milliseconds, medians of 7 with the empty call subtracted):

Action Links Value match
“Is empty” filter, cache empty 100 115
The same filter cached, plus the first page 42 51
A grid page of 100 emails with their path lookup cells 15 19
Add an account, then the same filter 124 160

Both found the same 8,882 used emails. Adding 1,000 GitHub rows with an email took 45 ms in the matching column and 42 ms in a plain text column of the same table (medians of 15, two runs: 45/42 and 47/44), about 10% more.

UI scenarios:

Scenario What was checked Result Screenshot
Create the field Target table Accounts, condition Platform is xxx, five links listed with “Links added later … are walked automatically” Pass dialog
Values in the grid alice (through GitHub), carol (through Google) and dave (direct) show their xxx account; bob (only on yyy) and erin are empty Pass grid
“Is empty” filter The Filter panel offers only “is empty” and “is not empty”; the view shows bob and erin Pass unused
Why alice@x.com ← GitHub: alice-dev ← Accounts: alice123 Pass why
Open a result The account opens on top of the email; Escape closes only the account Pass open
Another client’s change bob’s account moved to xxx through the API; the open filtered view dropped bob within a second Pass

Value match UI scenarios:

Scenario What was checked Result Screenshot
Set the match Twitter.Email set to match Emails.Address from the field dialog, with its dependency direction Pass dialog
Matched values After saving, alice@x.com, Bob@X.com and carol@x.com turn into links; nobody@x.com stays plain and says “No Emails record has this Address” on hover Pass
Two matches Bob@X.com matches two Emails records; the click lists both and opens the chosen one on top; Escape closes it Pass picker
One match, and a click beside the text alice@x.com opens its email; a click in the empty part of the cell only selects it Pass
Record view The Twitter record lists the matched emails under the value Pass record
Path lookup through the match The path lookup on Emails lists “Twitter.Email = Emails.Address”; alice and carol show their xxx accounts reached only through Twitter Pass links
Why carol@x.com ← Twitter: @carol (same Email) ← Accounts: carol-x Pass why
“Is empty” filter Only the two bob@x.com rows are left Pass unused
Another client’s change An xxx account for @nobody was added and its email changed to ERIN@x.com through the API; erin@x.com showed the account in the open grid within a second Pass live
Phone width At 390 px the field dialog is 380 px wide with no horizontal scroll Pass

Found by the final code review of value matches and fixed, each with a failing test first: a field whose match had broken could not be renamed or otherwise saved; any edit to the Emails table (or to the field’s own table) made open views reload; and after a type change the index could be marked ready before the conversion had written the values, so filters could undercount. A fourth change keeps reads cheap when many rows share one value.

Found by the final code review and fixed, each with a failing test first: automation trigger checks inside a write could read the filter cache from before it; a page of rows could spend the record limit once per row; every edit to the field’s own table made open views reload; a formula filter (filterByFormula) could read cells cut at 100 records; REST and MCP did not say when a cell was cut; an unsupported condition on the field was dropped instead of refused; deleting a field used in the target conditions widened the results instead of marking the field broken; a walk that ended exactly at the depth limit was called incomplete; and converting a field to a link lost its chosen direction.

Found and fixed during the UI check: a filter edited in the Filter panel was applied one step late, because the view re-queried before its new settings were saved (this affected every filter, not only path lookups); and Escape in a record opened from another record closed the one underneath.

Known limits

  • Automation triggers cannot use path lookups in their conditions (find records and other steps can).
  • Only “is empty” and “is not empty” can be tested; path lookups cannot be sorted, grouped, summarized or used in formulas, because their values are computed when records are read and never stored.
  • A cell shows at most 100 records, with the full count after them.
  • A matched column compares whole values: a cell with several emails separated by commas is one value. Matches feed path lookups and open records; lookups and rollups still need a link.
  • While a large table’s value index is being built, the “no record has this value” hint can show on values that will match.
  • The walks of one read visit at most 200,000 records together, and follow at most 64 links in a row. A filter that would need more is refused with a message to add target conditions or leave links out.