Skip to content

Conversation

nikochiko
Copy link
Member

  • add dialog for workspace creation
  • fix error msg display in step1 of workspace-creation dialog
  • fix: ui layout for workspace creation step 2
  • fix: remove assignment for form_div, make handle name input grow inside flexbox
  • better error handling for invalid emails, only use set_current_workspace at the end
  • add link-button to open workspace creation dialog from workflow page
  • preserve old UX for workspace selector when user has multiple workspaces
  • rename: form_buttons_div -> form_buttons_container
  • rename: error_msg_div -> error_msg_container
  • use rsplit with maxsplit=1 instead of split for parsing email address
  • add max_emails param in bulk-invite, change default from 10 to 5
  • fix: disallow common email domains in selector
  • remove admin restriction on creating new workspaces
  • ux and text adjustments for workspace create dialog
  • remove debug print statements
  • Deprecate old creator, business plans. Add new plan for business

Q/A checklist

  • If you add new dependencies, did you update the lock file?
poetry lock --no-update
  • Run tests
ulimit -n unlimited && ./scripts/run-tests.sh
  • Do a self code review of the changes - Read the diff at least twice.
  • Carefully think about the stuff that might break because of this change - this sounds obvious but it's easy to forget to do "Go to references" on each function you're changing and see if it's used in a way you didn't expect.
  • The relevant pages still run when you press submit
  • The API for those pages still work (API tab)
  • The public API interface doesn't change if you didn't want it to (check API tab > docs page)
  • Do your UI changes (if applicable) look acceptable on mobile?
  • Ensure you have not regressed the import time unless you have a good reason to do so.
    You can visualize this using tuna:
python3 -X importtime -c 'import server' 2> out.log && tuna out.log

To measure import time for a specific library:

$ time python -c 'import pandas'

________________________________________________________
Executed in    1.15 secs    fish           external
   usr time    2.22 secs   86.00 micros    2.22 secs
   sys time    0.72 secs  613.00 micros    0.72 secs

To reduce import times, import libraries that take a long time inside the functions that use them instead of at the top of the file:

def my_function():
    import pandas as pd
    ...

Legal Boilerplate

Look, I get it. The entity doing business as “Gooey.AI” and/or “Dara.network” was incorporated in the State of Delaware in 2020 as Dara Network Inc. and is gonna need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Dara Network Inc can use, modify, copy, and redistribute my contributions, under its choice of terms.

nikochiko added 26 commits March 1, 2025 01:58
@nikochiko nikochiko marked this pull request as ready for review March 27, 2025 10:21
@nikochiko nikochiko requested a review from devxpy March 27, 2025 10:24
greptile-apps[bot]

This comment was marked as resolved.

@nikochiko
Copy link
Member Author

nikochiko commented Apr 3, 2025

it is handled the same as CAN_VIEW (unlisted) for now. i want to convert them to CAN_VIEW in the database with a script after deployment. the db-default for team_permission is CAN_EDIT which correctly handles the access permissions for INTERNAL.
handling here:

  1. to add it to the "share" options if it is the current value: https://github.com/GooeyAI/gooey-server/pull/623/files#diff-3e36e90cb3e0717345cfaf4beec710140930413d5ca5dc5b572bf500a3cd753fR78-R79
  2. to get same text as CAN_VIEW for text / icon / label:

there aren't that many of them right now in the database - so they will be easy to manually run a script for.

devxpy added 12 commits April 3, 2025 22:47
…ve share modal logic from BasePage to dedicated workflow_share module - Improve code organization and reusability - Add proper type hints and docstrings - Maintain all existing functionality including team/personal workspace sharing
…re button rendering to workflow_share module - Add null checks for user in permission checks - Make workspace_id and user parameters optional in share button - Simplify permission methods in bots/models
- Rename PublishedRunPermission to WorkflowAccessLevel for better clarity
- Update permission levels to VIEW_ONLY, FIND_AND_VIEW, and EDIT
- Rename visibility/team_permission fields to public_access/workspace_access
- Update all related methods and references across the codebase
- Maintain hierarchical relationship: VIEW_ONLY < FIND_AND_VIEW < EDIT
@devxpy devxpy force-pushed the new-business-plan branch from 0d7afbb to e25c416 Compare April 4, 2025 23:20
devxpy added 7 commits April 4, 2025 16:28
Adds a membership check to ensure users with EDIT access level must be
members of the workspace. This prevents edge cases where users might
have EDIT access but no actual workspace membership.

The change modifies the access control logic in WorkflowAccessLevel to
require both EDIT access level AND workspace membership, in addition to
the existing checks for PR creators and workspace admins.
@devxpy devxpy force-pushed the new-business-plan branch from 50bf367 to b4224a1 Compare April 11, 2025 02:03
@devxpy
Copy link
Member

devxpy commented Apr 11, 2025

needs GooeyAI/gooey-gui#54 to work now

pr, selected_workspace=selected_workspace
)
with gui.div(className="mt-4 mt-lg-0 text-end"):
if user_can_edit:
Copy link
Member

Choose a reason for hiding this comment

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

publish form should not say "save" if selected workspace is different from published workspace

Copy link
Member Author

Choose a reason for hiding this comment

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

this is the behavior in the code. it is checked for in can_user_edit_published_run where we check selected_workspace.id == published_run.workspace_id.

Copy link
Member Author

Choose a reason for hiding this comment

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

maybe you were testing from an admin account?

and self.can_user_edit_published_run(self.current_pr)
and (
self.is_current_user_admin()
or self.current_workspace.id == self.current_pr.workspace_id
Copy link
Member

Choose a reason for hiding this comment

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

broke all pages for anonymous uses

self.request.user
and selected_workspace.id == published_run.workspace_id
and (
published_run.team_permission == PublishedRunPermission.CAN_EDIT
Copy link
Member

Choose a reason for hiding this comment

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

allows non-members to save published run if the team permission is set to EDIT

Copy link
Member Author

Choose a reason for hiding this comment

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

it doesn't because on like 490, we check for selected_workspace.id == published_run.workspace_id?

@devxpy devxpy merged commit 624b8da into master Apr 11, 2025
6 checks passed
@devxpy devxpy deleted the new-business-plan branch April 11, 2025 23:10
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