Skip to content

Conversation

jyeshe
Copy link
Collaborator

@jyeshe jyeshe commented May 30, 2025

Description

This PR adds an icon on the workflows and projects lists when the user has a chat in a job that belongs to the workflow or project (directly or indirectly).

It also indicates if the user has started a chat on a specific job, on the Workflow Diagram

Closes #2922

Validation steps

  1. Look at the Projects table and see no icon
  2. Change exists to not exists on
    has_ai_chat: exists(chat_session_exists_query)
  3. Look again at the Projects table and the sparkles are there
  4. Repeat for Workflows table by changing the exists on this line:
    select: %{w | has_ai_chat: exists(chat_session_exists_query)},
  5. Finally to check the Jobs on the Workflow Diagram, change the line
    Map.put(job, "has_ai_chat", has_ai_chat)

Additional notes for the reviewer

  1. (Is there anything else the reviewer should know or look out for?)

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to know!):

  • Code generation (copilot but not intellisense)
  • Learning or fact checking
  • Strategy / design
  • Optimisation / refactoring
  • Translation / spellchecking / doc gen
  • Other
  • I have not used AI

You can read more details in our Responsible AI Policy

Pre-submission checklist

  • I have performed a self-review of my code.
  • I have implemented and tested all related authorization policies. (e.g., :owner, :admin, :editor, :viewer)
  • I have updated the changelog.
  • I have ticked a box in "AI usage" in this PR

@github-project-automation github-project-automation bot moved this to New Issues in v2 May 30, 2025
@jyeshe jyeshe force-pushed the chat-present-with-sparkles branch 3 times, most recently from cbec882 to 197423d Compare May 30, 2025 15:27
@jyeshe jyeshe changed the title Chat present with sparkles Indicate chat exists on project, workflow or job May 30, 2025
@jyeshe jyeshe self-assigned this May 30, 2025
Copy link

codecov bot commented May 30, 2025

Codecov Report

Attention: Patch coverage is 94.28571% with 2 lines in your changes missing coverage. Please review.

Project coverage is 89.95%. Comparing base (f069ed2) to head (cc00542).

Files with missing lines Patch % Lines
...ib/lightning_web/live/dashboard_live/components.ex 85.71% 1 Missing ⚠️
...ing_web/live/workflow_live/dashboard_components.ex 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3258      +/-   ##
==========================================
- Coverage   89.96%   89.95%   -0.02%     
==========================================
  Files         367      367              
  Lines       14389    14412      +23     
==========================================
+ Hits        12945    12964      +19     
- Misses       1444     1448       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jyeshe jyeshe marked this pull request as ready for review June 2, 2025 07:15
@jyeshe jyeshe requested review from josephjclark and elias-ba June 2, 2025 08:08
Copy link
Contributor

@elias-ba elias-ba left a comment

Choose a reason for hiding this comment

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

Hey @jyeshe great job, man. I have just one comment on the placement of the sparkles icon in the projects and workflows table. Maybe worth chatting with @taylordowns2000 and @josephjclark for UI ideas.

@github-project-automation github-project-automation bot moved this from New Issues to In review in v2 Jun 2, 2025
@elias-ba elias-ba force-pushed the chat-present-with-sparkles branch from 98e0736 to cc00542 Compare July 3, 2025 17:21
@elias-ba elias-ba requested review from elias-ba and stuartc and removed request for elias-ba July 3, 2025 18:42
stuartc added 3 commits July 15, 2025 09:17
- Resolve conflict in dashboard_live/components.ex
- Keep sparkles functionality while preserving styling improvements from main
[ci skip]
@stuartc
Copy link
Member

stuartc commented Jul 15, 2025

We seem to have a regression since I merged in main, the icon no longer renders on the job nodes.

And we want to use a different icon, the sparkles is used elsewhere for different intents.

@stuartc
Copy link
Member

stuartc commented Jul 16, 2025

Notes:

We need to take a look at how the querying works and the performance implications.

It feels like the query additions (i.e. populating the has_ai_chat field) could be in a better place, and we need to
check what other places will also end up calling them.

Also we need to check the performance implications, and possibly consider a caching layer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In review
Development

Successfully merging this pull request may close these issues.

Show an Icon for Projects, Workflows and Steps that have associated AI chats
4 participants