Skip to content

Conversation

@mdroidian
Copy link
Contributor

@mdroidian mdroidian commented Sep 27, 2025

Prepopulated tags

Evidence: #evd-candidate
Claim: #clm-candidate

Placeholders

  • Grab the first reference in format, use it's first 3 letters (evd-candidate)
  • If no reference exists (Source, for example), fallback to the node label, use it's first 3 letters (sou-candidate)

Summary by CodeRabbit

  • New Features
    • Tag input now shows a smart, auto-generated placeholder based on the node’s reference or its text, improving guidance and reducing manual typing.
    • Default nodes include prefilled candidate tags (e.g., for CLM and EVD), streamlining initial setup and promoting consistent tagging.
    • These updates are purely UI-facing (placeholders and defaults) and do not alter saved data or validation behavior.

@linear
Copy link

linear bot commented Sep 27, 2025

@mdroidian mdroidian requested a review from sid597 September 27, 2025 05:38
@supabase
Copy link

supabase bot commented Sep 27, 2025

This pull request has been ignored for the connected project zytfjzqyijgagqxrzbmz because there are no changes detected in packages/database/supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@mdroidian
Copy link
Contributor Author

@CodeRabbit full review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 27, 2025

✅ Actions performed

Full review triggered.

cursor[bot]

This comment was marked as outdated.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 27, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Introduces a helper to generate tag placeholders in NodeConfig and updates default discourse node data to include tag values for specific entries. The UI now derives the Tag input placeholder from node content, and two default nodes have explicit tag strings added.

Changes

Cohort / File(s) Summary of Changes
UI placeholder generation
apps/roam/src/components/settings/NodeConfig.tsx
Added generateTagPlaceholder(node) to compute Tag input placeholders from node reference or text; replaced static placeholder with helper output.
Default node data tags
apps/roam/src/data/defaultDiscourseNodes.ts
Added tag fields to two INITIAL_NODE_VALUES entries: CLM -> "#clm-candidate", EVD -> "#evd-candidate".

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant UI as NodeConfig UI
  participant Helper as generateTagPlaceholder
  User->>UI: Open node settings
  UI->>Helper: Request placeholder for node
  alt Node has [[REF]] in format
    Helper-->>UI: "#{ref-lower-3}-candidate"
  else No ref found
    Helper-->>UI: "#{text-lower-3}-candidate"
  end
  UI-->>User: Render Tag input with placeholder
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title directly references the primary work of shipping prepopulated tags and adjusting the tag placeholder logic, which aligns precisely with the changes in the PR. It succinctly conveys the main objectives without extraneous detail and follows common project conventions by including the relevant ticket numbers. This makes the title clear and immediately informative for any teammate reviewing the history.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 17dd710 and 79daefd.

📒 Files selected for processing (2)
  • apps/roam/src/components/settings/NodeConfig.tsx (2 hunks)
  • apps/roam/src/data/defaultDiscourseNodes.ts (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-08-25T15:53:21.799Z
Learnt from: sid597
PR: DiscourseGraphs/discourse-graph#372
File: apps/roam/src/components/DiscourseNodeMenu.tsx:116-116
Timestamp: 2025-08-25T15:53:21.799Z
Learning: In apps/roam/src/components/DiscourseNodeMenu.tsx, when handling tag insertion, multiple leading hashtags (like ##foo) should be preserved as they represent user intent, not normalized to a single hashtag. The current regex /^#/ is correct as it only removes one leading # before adding one back, maintaining any additional hashtags the user intended.

Applied to files:

  • apps/roam/src/data/defaultDiscourseNodes.ts
  • apps/roam/src/components/settings/NodeConfig.tsx
📚 Learning: 2025-06-17T23:37:45.289Z
Learnt from: maparent
PR: DiscourseGraphs/discourse-graph#220
File: apps/roam/src/utils/conceptConversion.ts:42-56
Timestamp: 2025-06-17T23:37:45.289Z
Learning: In the DiscourseNode interface from apps/roam/src/utils/getDiscourseNodes.ts, the field `node.type` serves as the UID field rather than having a conventional `node.uid` field. This is an unusual naming convention where the type field actually contains the unique identifier.

Applied to files:

  • apps/roam/src/data/defaultDiscourseNodes.ts

@mdroidian mdroidian merged commit 71c03e7 into main Sep 29, 2025
6 checks passed
@mdroidian mdroidian deleted the eng-890-ship-pre-populated-tags-just-for-evidence-and-claim branch September 29, 2025 15:32
@github-project-automation github-project-automation bot moved this to Done in General Sep 29, 2025
trangdoan982 pushed a commit that referenced this pull request Oct 3, 2025
#460)

* Add default tags for Claim and Evidence nodes in defaultDiscourseNodes.ts

* Add generateTagPlaceholder function to create dynamic tag placeholders for nodes in NodeConfig component in the format of abc-candidate

* missed #
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants