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

update opened_at to be nullable #7767

Merged
merged 19 commits into from
Mar 12, 2025
Merged

Conversation

maryhipp
Copy link
Collaborator

Summary

Update schema for WorkflowLibrary to allow nullable opened_at to better represent when a workflow has never been opened. Opted to make a new column versus repurposing old one, which means users will lost historical "opened_at" data but will have better data integrity going forward.

Related Issues / Discussions

QA Instructions

Merge Plan

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

@github-actions github-actions bot added api python PRs that change python files services PRs that change app services frontend PRs that change frontend files labels Mar 11, 2025
@psychedelicious
Copy link
Collaborator

There is no real historical data, it's fake news. Was never actually used by OSS UI. I will update the migration to simply wipe the column.

@psychedelicious psychedelicious force-pushed the maryhipp/nullable-opened-at branch from 715db8f to f1f2d2c Compare March 12, 2025 00:00
@github-actions github-actions bot added the frontend-deps PRs that change frontend dependencies label Mar 12, 2025
@psychedelicious psychedelicious force-pushed the maryhipp/nullable-opened-at branch from f1f2d2c to a15235c Compare March 12, 2025 00:01
@psychedelicious
Copy link
Collaborator

psychedelicious commented Mar 12, 2025

  • Fix conflicts from feat: workflow library iteration 2 #7765
  • Fix some perf issues
  • Ensure index is recreated for new column, drop the old column entirely bc there's no valuable data in it
  • Rename is_recent -> has_been_opened
  • Rework how we store the selected view for library. Previously we were deriving the view from selected categories and whether or not we are showing workflows that have been opened. Basically storing the query args and deriving the view from that, which is confusing and tedious. Reversed it so that now we store view: 'recent' | 'yours' | 'private' | 'shared' | 'defaults' in state, and derived the query args from the view.
  • Added method to get counts for individual categories so that we can. This allows us to check if the user's selected view has no workflows to show, and switch to the next available view that has workflows to show. For example, if the user has no recent workflows or user workflows, we should show the default workflows initially. If the user has no recents, but does have user workflows, we should instead show the user's workflows initially.
  • When creating a new workflow, mark it as opened at the time it was created so it shows up in recents

@psychedelicious psychedelicious merged commit 89f457c into main Mar 12, 2025
15 checks passed
@psychedelicious psychedelicious deleted the maryhipp/nullable-opened-at branch March 12, 2025 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api frontend PRs that change frontend files frontend-deps PRs that change frontend dependencies python PRs that change python files services PRs that change app services
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants