Skip to content

fix: APP-868 close project edit/create #2801

Merged
blushi merged 12 commits intodevfrom
fix-APP-868-close-project-edit
Mar 16, 2026
Merged

fix: APP-868 close project edit/create #2801
blushi merged 12 commits intodevfrom
fix-APP-868-close-project-edit

Conversation

@blushi
Copy link
Member

@blushi blushi commented Feb 3, 2026

Description

https://regennetwork.atlassian.net/browse/APP-868


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • provided a link to the relevant issue or specification
  • provided instructions on how to test
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

How to test

  1. Click "Create project" from the header
    1.1. then click the x close button at the top right, you should go back to the page you were before.
    1.2. Do the same while going through a few steps of the project creation process and click close, you should go back to the page you were before starting the create flow.
  2. Create a project from your user or org dashboard and repeat 1.1 and 1.2.
  3. Edit a project from the project page itself, click the close button, you should go back to the project page.
  4. Edit a project from the user or org dashboard project manage page, click the close button, you should go back to the corresponding dashboard project manage page

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items
.

I have...

  • confirmed all author checklist items have been addressed
  • reviewed code correctness and readability
  • verified React components follow DRY principles
  • reviewed documentation is accurate
  • reviewed tests
  • manually tested (if applicable)

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @blushi, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the user experience during project creation and editing by implementing a more contextual navigation flow. Instead of a broad redirect to the dashboard upon closing, users are now guided directly to the management page of the specific project they were working on, enhancing workflow continuity.

Highlights

  • Navigation Logic Update: The navigation logic for closing project creation/editing forms has been updated to redirect users to the specific project's management page, rather than a generic dashboard.
  • DAO Organization Integration: The useDaoOrganization hook is now utilized within the ProjectCreate component to inform the navigation path, especially for organization-managed projects.
  • Dynamic Project Path: A dynamic projectPath is constructed using the projectId to ensure precise redirection to the relevant project management interface.
Changelog
  • web-marketplace/src/legacy-pages/ProjectCreate/ProjectCreate.tsx
    • Added an import for the useDaoOrganization hook.
    • Integrated the useDaoOrganization hook within the ProjectCreate component.
    • Updated the handleRequestClose callback to construct a dynamic project management path and navigate to it, considering both organization accounts and DAO-managed projects.
Activity
  • No human activity (comments, reviews, progress) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

In this pull request, you've updated the close button behavior on the project create/edit page to redirect to the project management page. The logic seems correct. I've added one suggestion to refactor the navigation logic to make it more concise and avoid code duplication.

@netlify
Copy link

netlify bot commented Feb 3, 2026

Deploy Preview for terrasos ready!

Name Link
🔨 Latest commit 59ef5e5
🔍 Latest deploy log https://app.netlify.com/projects/terrasos/deploys/69b7f4da1151070008a8f119
😎 Deploy Preview https://deploy-preview-2801--terrasos.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@blushi blushi marked this pull request as ready for review February 24, 2026 09:11
@blushi
Copy link
Member Author

blushi commented Feb 24, 2026

@erikalogie @S4mmyb see testing instructions

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d6cade4545

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@erikalogie
Copy link
Collaborator

https://www.loom.com/share/ffd608af1eda43639e9f43dc2366e9d9

@erikalogie
Copy link
Collaborator

@blushi
Copy link
Member Author

blushi commented Mar 3, 2026

https://www.loom.com/share/73d711b09c1647189ab6feb0f46e2a8a

The issue when clicking "save and draft" with empty project name was already there, since a long time I guess.
This is because it falls back to displaying the project slug which is derived from the project name, since the project name is an empty string, the slug is an empty string too but if that slug already existed, then we append '-1', '-2', etc. to get a new unique slug.
I've fixed that so that we do not define any slug if the project is still empty so it will just show the project uuid instead (since this is the only reliable identifier for the newly created project)

image

@blushi
Copy link
Member Author

blushi commented Mar 3, 2026

https://www.loom.com/share/ffd608af1eda43639e9f43dc2366e9d9

The issue could be reproduced by clicking "create project" from the dashboard, closing the form then clicking "create project" and trying to close the form again. This was because of both react and next router being used in that case which caused some route re-rendering issue. I've pushed a fix.

@blushi blushi force-pushed the fix-APP-868-close-project-edit branch from ff4d968 to cc87ddc Compare March 3, 2026 12:12
@blushi
Copy link
Member Author

blushi commented Mar 3, 2026

https://www.loom.com/share/73d711b09c1647189ab6feb0f46e2a8a

The last remaining issue was after creating a org project from basic info form through "save & exit", for some reason you were still redirected to the rest of the project create flow (location form) and then clicking close button led to user dashboard instead of org dashboard. I've fixed it so that you are not being redirected to location form in the first place since you want to save and EXIT.
(If you get any error while creating the org project, create a new dao, it might mean that the one you were using uses a deprecated version of the cosmwasm contracts, because my branch was previously using those deprecated versions too)

@erikalogie
Copy link
Collaborator

@blushi
Copy link
Member Author

blushi commented Mar 3, 2026

https://www.loom.com/share/8394d1628d3d42b89a97d5a9eb9b4aaa

if you reload the page, does the project location show up? If yes, then that's a data caching issue, let's open a separate bug for it.
Looking into the other issue with the close btn

@erikalogie
Copy link
Collaborator

https://www.loom.com/share/8394d1628d3d42b89a97d5a9eb9b4aaa

if you reload the page, does the project location show up? If yes, then that's a data caching issue, let's open a separate bug for it. Looking into the other issue with the close btn

Yes it works on reload. I'll open a new bug for it

@erikalogie
Copy link
Collaborator

Bug for project location: https://regennetwork.atlassian.net/browse/APP-890?atlOrigin=eyJpIjoiN2NmNDIxNzQ1NTJlNDdmMmI3ZjJhODU3NzMwNTllZTMiLCJwIjoiaiJ9

@blushi
Copy link
Member Author

blushi commented Mar 3, 2026

https://www.loom.com/share/8394d1628d3d42b89a97d5a9eb9b4aaa

if you reload the page, does the project location show up? If yes, then that's a data caching issue, let's open a separate bug for it. Looking into the other issue with the close btn

I've fixed the close button issue from the edit form, this happened when opening the edit form a first time, closing it, opening it a second time and then trying to close it again.
Having a look now at the "save & exit" that leads back to user dashboard.

@blushi
Copy link
Member Author

blushi commented Mar 4, 2026

Having a look now at the "save & exit" that leads back to user dashboard.

It looks like this issue is already on dev, so I've created a separate bug for it on jira: https://regennetwork.atlassian.net/jira/software/c/projects/ENG/boards/51?selectedIssue=APP-892

@erikalogie
Copy link
Collaborator

LGTM!

@blushi
Copy link
Member Author

blushi commented Mar 9, 2026

@alexander-astrand could you have a look at this? thanks!

| undefined;
const [searchParams] = useSearchParams();
const fromPath = searchParams.get('from');
const fromDashboard = !!fromPath;
Copy link
Contributor

Choose a reason for hiding this comment

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

fromDashboard is now true whenever a from param exists, but from is also set by ListProject and SellOrdersActionsBar, which aren't the dashboard. Could this name be misleading? Maybe hasOriginPath or similar?

Copy link
Member Author

Choose a reason for hiding this comment

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

renamed: 2c2c8a9

const [searchParams] = useSearchParams();
const fromPath = searchParams.get('from');
const fromDashboard = !!fromPath;
const isOrganizationParam = searchParams.get('isOrganization') === 'true';
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this param only added from MyProjects? If a user bookmarks or shares a URL with isOrganization=true, could it cause unexpected behavior?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes
if the user bookmarks the URL then it means it would try to create the project from the org account, which makes sense, I don't see how this is unexpected behavior

@blushi blushi requested a review from alexander-astrand March 9, 2026 11:22
@S4mmyb
Copy link
Member

S4mmyb commented Mar 9, 2026

LGTM!

@blushi blushi force-pushed the fix-APP-868-close-project-edit branch from 2c2c8a9 to 59ef5e5 Compare March 16, 2026 12:17
@blushi blushi enabled auto-merge (squash) March 16, 2026 12:17
@blushi blushi disabled auto-merge March 16, 2026 12:24
@blushi blushi merged commit 933c7f6 into dev Mar 16, 2026
14 checks passed
@blushi blushi deleted the fix-APP-868-close-project-edit branch March 16, 2026 12:24
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.

4 participants