Repository navigation
Add a link field type: a title and URL pair for schema fields - #3579
Conversation
Pragmatic Code Review: PR #3579 (link field type, issue #3541 / ADR-092 §4)Review Type: Initial Review (no prior reviews or comments on the PR). Reviewed the three PR commits at head SummaryThe change is well layered and a clear net improvement. No blockers. One Important item: the title-template rendering puts Markdown syntax into What I checked:
Requirements Check
Code Review Findings1. 🟡 Important: the title template writes Markdown into a plain-text title📁 This is partly a judgment call on the acceptance criterion; the inconsistency itself is confirmed in code.
Recommendation: render a link in a title as its plain label (the title, or the URL when the title is empty), the same rule Principle: least surprise, and one representation per field ( 2. 🟢 Suggestion:
|
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review: APPROVE (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.
Address-review summary (commit
|
Pragmatic Code Review: PR #3579 (link field type, issue #3541 / ADR-092 §4)Review Type: Re-Review. Reviewed commit Previous Review Summary
Title parity, Rust against TypeScript. I traced both sides for the same stored value:
They agree for every value a validated write can store. They differ only for values validation refuses (nit 2). The resolver test does exercise the resolver. Tests run at HEAD
Code Review Findings1. 🟡 Improvement: the app's link editor accepts a URL the backend now refuses📁 This commit made the backend refuse any whitespace in a link's
A pasted search URL with a space in its query is a realistic input. Recommendation: in Nits
RecommendationAPPROVE. The commit resolves the one Important finding from the first review and the three optional ones it took on, and the skips are sound. Finding 1 is a small fix worth folding in before merge, because this commit introduced the mismatch. The PR description should be corrected at the same time. |
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review (re-review): APPROVE (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.
Address-review summary, re-review (commit
|
|
Merge queue: #3579 was taken out of the queue — it conflicts with main in: packages/core/src/models/mod.rs. Merge or rebase origin/main, resolve the conflicts, push, and re-run |
Pragmatic Code Review: PR #3579 (link field type, issue #3541 / ADR-092 §4)Review Type: Re-Review. Reviewed head Previous Review Summary
Merge resolutions (three merges of
Query paths into a link field. The change is correct, and it matches at run time, not only at the schema check:
Landing this code inside merge commit Tests run at HEAD
Code Review Findings1. 🔴 Blocker for landing: the branch conflicts with current
|
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review (re-review): REQUEST CHANGES (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.
Address-review summary, third reviewAddressed
Skipped
Also in this round (from the comment on #3541): a query filter and sort can read
Re-Review DecisionDecision: NO RE-REVIEW NEEDED Rationale: The only change since the third review is the merge of |
|
Merge queue: #3579 was taken out of the queue — the merge gate failed on it, on top of main. Reproduce by merging or rebasing |
|
Merge queue: #3579 was taken out of the queue — it conflicts with main in: packages/agent/tests/it/main.rs. Merge or rebase origin/main, resolve the conflicts, push, and re-run |
1353624 to
e2d39ec
Compare
Closes #3541. Implements ADR-092 §4.
What changed
Adds
linkto the schema field types: a title and an absolute URL. This is a field-type change, not a node-type change: no core type, field, relationship or rule is added, andnode-types.mdis unaffected. The core fields that will use it (project.repository,task.pull_request,task.commits) are not part of this PR.Wire type (
nodespace-types)SchemaFieldType::Link, listed inALL.LinkValue { title, url }: snake_case keys,deny_unknown_fields, generated to TypeScript (link-value.ts).LinkValue::from_jsonis the one check of a link's shape.urlmust parse with a scheme and a host; the scheme is not restricted.Core
check_field_value) refuses a missing key, an extra key, a non-string part, a relative URL, a URL carrying whitespace or a bare string, naming the field and the problem. Anarrayfield withitemType: linkchecks each item and names its index.uniqueis refused.linkis refused as an edge field type: no write validates edge values of that type.node.<field>.titleandnode.<field>.url. It previously treated every field as terminal, so these paths were rejected at save time.Agent
create_schema/update_schemalistlinkamong the field types (Stage-2 tool-surface golden re-recorded: two description lines).field_valuesis declared to the model as an object withtitleandurl.App
LinkFieldControl: shows a link as its title, opens the URL through the existing opener, edits title and URL. A link is written whole, so the two inputs are a draft committed only when complete; blank clears it.httpandhttpsare opened. Any other scheme is shown as text.Docs
packages/skill/references/cli.md: writing, clearing and reading a link.architecture/data-layer.md(field types and the link shape) andcomponents/creating-node-types.md, pushed tomainalongside this PR.How the acceptance criteria were read
groupBy. No refusal was added; a test pins that a link field is never offered and a stored selection naming one is ignored.propertiesline prints the link's object, which carries both.Tests
nodespace-types: link shape, vocabulary round trip.nodespace-core:link_field_type_test(store, clear, every refusal, lists, unique refusal on create and update, title template), CEL condition reads, Play path validation, edge-field refusal.nodespace-agent: write tools accept a link and refuse a bare string; declaredfield_valuesshape.nodespace-cli:--propertysets, reads and clears a link;schema getreportslink.link-values,link-field-control, nested editor list of links, table row, title template, kanban eligibility.bun run test:changedpasses on every tier.🤖 Generated with Claude Code