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

feat: workspace in breadcrumbs LAM-427 #369

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from

Conversation

olzhik11
Copy link
Contributor

@olzhik11 olzhik11 commented Feb 3, 2025

  • Renamed project -> projects route
  • Added new workspace context that contains data about workspace, context, and all current workspaces
  • Added workspace name into Header

Important

This PR introduces a workspace context, updates project paths from /project to /projects, and modifies components to use the new context and paths.

  • Behavior:
    • Introduces WorkspaceContextProvider in workspace-context.tsx to manage workspace and project data.
    • Updates navigation paths from /project to /projects across multiple components and files.
    • Adds workspace name to Header component.
  • Components:
    • Updates ProjectNavbar, Header, and other components to use WorkspaceContext.
    • Modifies CreateDatasetDialog, CreatePlaygroundDialog, CreateQueueDialog, and similar components to use new project paths.
  • Routing:
    • Renames routes from /project to /projects in middleware.ts and other files.
    • Updates API calls and links to reflect new paths.
  • Misc:
    • Adjusts middleware.ts to handle new project path structure.
    • Minor refactoring and cleanup in various components.

This description was created by Ellipsis for 3a96134. It will automatically update as commits are pushed.

@olzhik11
Copy link
Contributor Author

olzhik11 commented Feb 3, 2025

@dinmukhamedm sorry for a lot of changes, for some reason there is a lot of noise in PR, mostly I changed urls from project -> projects there.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 3a96134 in 1 minute and 44 seconds

More details
  • Looked at 3964 lines of code in 47 files
  • Skipped 0 files when reviewing.
  • Skipped posting 6 drafted comments based on config settings.
1. frontend/components/dashboard/dashboard.tsx:57
  • Draft comment:
    The useEffect dependency array is empty although it uses searchParams values (pastHours, startDate, endDate). Consider including them as dependencies to ensure the effect runs when these values change.
  • Reason this comment was not posted:
    Comment was on unchanged code.
2. frontend/components/evaluation/evaluation.tsx:232
  • Draft comment:
    Routing URL uses '/project/' instead of '/projects/'. This inconsistency might break navigation; update the URL to use '/projects/'.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. frontend/components/traces/page-placeholder.tsx:94
  • Draft comment:
    Accordion components are used but not imported from the UI library. Ensure all dependent components (e.g. Accordion, AccordionItem, AccordionTrigger, AccordionContent) are correctly imported.
  • Reason this comment was not posted:
    Comment did not seem useful.
4. frontend/contexts/workspace-context.tsx:35
  • Draft comment:
    The memoized value depends on 'params?.projectId' and the entire 'result' object. Ensure that any changes in the workspace list trigger a recomputation if necessary.
  • Reason this comment was not posted:
    Confidence changes required: 40%
    None
5. frontend/middleware.ts:6
  • Draft comment:
    The regex in line 6 uses '//projects?/' which matches both 'project' and 'projects'. Make sure this is intentional or adjust the pattern if only '/projects/' should be matched.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    None
6. frontend/components/evaluations/create-evaluation-dialog.tsx:22
  • Draft comment:
    It appears that getLocalDevSessions is imported but not invoked. If this function is meant to return session IDs, it should be called as getLocalDevSessions() rather than assigned directly. This might result in devSessionIds being a function rather than actual data.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_AtK52IJT7rV30MY8


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Member

@dinmukhamedm dinmukhamedm left a comment

Choose a reason for hiding this comment

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

Looks good overall. Two questions:

  1. How did you test this? It looks like this affects many pages, and extensive manual testing is required.
  2. How shall we release it? Should we make (temporarily) a 307 redirect from /project/* to /projects/* so that people who have the page open don't end up with a 404 page?

if (comparedEvaluationId === undefined) {
console.warn('comparedEvaluationId is undefined');
console.warn("comparedEvaluationId is undefined");
Copy link
Member

Choose a reason for hiding this comment

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

nit: can you make a note to remove this console.warn in your next PR when you start re-working evaluations?

frontend/contexts/workspace-context.tsx Show resolved Hide resolved
frontend/contexts/workspace-context.tsx Outdated Show resolved Hide resolved
@olzhik11
Copy link
Contributor Author

olzhik11 commented Feb 4, 2025

@dinmukhamedm fixed comments above, for redirect part as we discussed it might not be needed, but if that's not the case I can make some logic for it

@dinmukhamedm
Copy link
Member

@olzhik11 if that's not too difficult (maybe timebox like 20 minutes), can you please add a redirect? It takes some time for users to update the library

@olzhik11
Copy link
Contributor Author

@dinmukhamedm sorry it took time, I added redirects

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