Skip to content

Conversation

@alexander-astrand
Copy link
Contributor

Description

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


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

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)

@netlify
Copy link

netlify bot commented Jan 19, 2026

Deploy Preview for terrasos ready!

Name Link
🔨 Latest commit 0dd8331
🔍 Latest deploy log https://app.netlify.com/projects/terrasos/deploys/6978996a0186aa0008d93894
😎 Deploy Preview https://deploy-preview-2790--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.

@gemini-code-assist
Copy link

Summary of Changes

Hello @alexander-astrand, 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 introduces a new feature that empowers users to explicitly select whether they want to sign data posts using their personal account or an associated organization account. This enhancement improves user control over data attestation and ensures that the signing entity is accurately represented. The changes involve updating the signing modal's user interface to include an account selection dropdown and modifying the underlying signing logic to correctly handle the chosen account type for transaction processing.

Highlights

  • Account Selection for Data Signing: Users can now choose to sign data posts either as their personal account or as an organization, if applicable, providing greater flexibility in data attestation.
  • UI Integration of Account Selector: A new ProjectAccountSelector component has been integrated into the SignModal to allow users to easily select their desired signing account (personal or organization).
  • Conditional Organization Signing Logic: The useSign hook has been updated to process the signAs parameter, ensuring that transactions are correctly signed by the chosen entity (user or organization) and conditionally applying the feeGranter based on this selection.
  • Improved Dropdown Portaling: The ProjectAccountSelector component now supports rendering its dropdown menu using createPortal, which helps resolve potential z-index and positioning issues when the selector is used within modals or other constrained layouts.
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

@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

This pull request successfully implements the functionality to allow users to select whether to sign a data post as their personal account or as an organization. The changes are well-structured, introducing a selector in the signing modal and correctly passing the choice down to the signing logic. The enhancement to ProjectAccountSelector to use a portal for its dropdown is a great improvement for UI consistency, preventing clipping issues within modals. I have a couple of suggestions to improve the code further by applying React best practices for performance and simplifying some logic for better readability.

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: 409fdb46b0

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Member

@blushi blushi left a comment

Choose a reason for hiding this comment

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

  • Make sure to run i18n scripts

  • If I create a data post for a personal project (from my user account) while being part of an org, then I see the select field when signing it, I don't think it should be the case, it should be only for projects from the org. Thoughts @erikalogie ?

  • "Personal" and "Organization" should be black not grey

Image

@erikalogie
Copy link
Collaborator

  • If I create a data post for a personal project (from my user account) while being part of an org, then I see the select field when signing it, I don't think it should be the case, it should be only for projects from the org. Thoughts @erikalogie ?

Correct, dropdown should only appear for projects from the org

@erikalogie
Copy link
Collaborator

I'm not seeing the actual logos of the org, just the default image
image

Image not loading on actual post page (maybe needs separate ticket?):
image

On the post page the org image does not show:
image

@blushi
Copy link
Member

blushi commented Jan 20, 2026

On the post page the org image does not show: image

I've also noticed it and fixed this in #2791 already

@blushi
Copy link
Member

blushi commented Jan 20, 2026

I'm not seeing the actual logos of the org, just the default image <img alt="image" width="2000" height="1694" src="https://private-user-images.githubusercontent.com/8460237/538068076-317b6bd4-3cbb-483c-bed0-
Image not loading on actual post page (maybe needs separate ticket?): image

Yes since this is unrelated to the work in this PR, could you create a separate task for that? thanks

@erikalogie
Copy link
Collaborator

I'm not seeing the actual logos of the org, just the default image <img alt="image" width="2000" height="1694" src="https://private-user-images.githubusercontent.com/8460237/538068076-317b6bd4-3cbb-483c-bed0-
Image not loading on actual post page (maybe needs separate ticket?): image

Yes since this is unrelated to the work in this PR, could you create a separate task for that? thanks

Sure, done: https://regennetwork.atlassian.net/browse/APP-873

@alexander-astrand alexander-astrand force-pushed the feat-APP-854-select-field-for-signing-data-post branch from 7e97240 to 8518590 Compare January 26, 2026 12:19
@alexander-astrand alexander-astrand force-pushed the feat-APP-854-select-field-for-signing-data-post branch from 39d6c87 to 0dd8331 Compare January 27, 2026 10:54
iri={iri}
published={createdPostData?.published}
hasAddress={hasAddress}
isOrganizationProject={pathname.startsWith('/dashboard/organization')}
Copy link
Member

@blushi blushi Jan 27, 2026

Choose a reason for hiding this comment

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

oh actually after thinking more about this, this doesn't support the case where you create a data post from the project page itself ( and not from the org dashboard)
so I think the best way would be to check that the current user belongs to the org the project belongs to

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