Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use flow-state for Callouts in space, instead of callout-group #4995

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

ccanos
Copy link
Contributor

@ccanos ccanos commented Feb 28, 2025

Problem 1:

On Space Level 0. We were not using innovation_flows at all.
Regardless of the level, all the spaces have a collaboration, and all the collaborations have an innovation_flow. (at least on accepance. the first migration will fail if this is not true in prod).
Innovation flows have a innovation_flow > profile > tagsets tagset with name='flow-state' that specifies the current selected state of the Innovation Flow.

  • Problem: There are innovation-flows (in acc) that don't have a tagset and that gives an error when you query the currentState. Also gives an error when the state is not one of the 4 valid states (which happens a lot). At space level 0, innovation flows were not used at all so we were not facing these errors in the past.
  • The first migration, will go through all level 0 spaces, get their innovation_flow, get their tagsets, set the correct tags (current state), and the allowedValues and defaultValue in the tagset_template.
  • This tagset_template has a tagsetTemplateSetId which has to be set to callouts_set.tagsetTemplateSetId of the space.
  • This problem is just bad data, solved with the first migration 1740738523228-innovation-flow-tagsets.ts

Problem 2:

Callouts in Spaces are organized in tabs using a tagset with name='callout-group'. In subspaces they are organized in those tabs/flow-states with a tagset with name='flow-state'.
Those two tagsets are linked by the callout > callout_framing > profile > tagsets.
So normally callouts have 3 tagsets: name = 'default', name = 'callout-group', name = 'flow-state'.

  • On Space L0, I have found many cases (with acc data) of callouts that don't have a tagset with name = 'flow-state'. Or that have it incorrect.

  • The second migration 1740750569873-callouts-groupsToStates.ts corrects this, it will loop through all the callouts in L0 spaces, get the profile, also get the InnovationFlow to get the valid states.

    • Then with the profile will get the callout-group tagset, and identify if it's "HOME", "COMMUNITY", "SUBSPACES" or "KNOWLEDGE", if it's something different it will fail.
    • Then it will ensure that the tagset flow-state is correct, or will create a flow-state tagset if it doesn't exist.
  • This is a bigger problem and requires further work:

PENDING:

  • For retrieving callouts from the client we use a parameter groups at the callouts resolver to filter callouts by group.
  • It would be nice to have a filter by state there.
  • We have some logic to split callouts in groups that may be quite useful to have also for states.
  • Client needs to be changed to remove the logic of retrieving callouts by groups and just get them by states or filter them client-side like we are doing at the moment on subspaces.

Copy link
Contributor

coderabbitai bot commented Feb 28, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ccanos
Copy link
Contributor Author

ccanos commented Feb 28, 2025

@coderabbitai review

Copy link
Contributor

coderabbitai bot commented Feb 28, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@techsmyth
Copy link
Member

@ccanos thanks for the super summary. The current status once this work goes through is that we will I think not be using the groups functionality at all - right? And we have the secondary consideration that flow states is specific to callouts in use within Collaboration: that does not apply to callouts within a knowledge base. A third one is that it feels odd to be using the callout framing profile for the filtering, this feels more like a direct property on the callout. @valentinyanakiev lets discuss this on Tuesday.

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

Successfully merging this pull request may close these issues.

2 participants