refactor(vara-eth-idea/frontend): use same sails payload form component for all program actions #2311
Merged
nikitayutanov merged 7 commits intomainfrom Jan 30, 2026
Merged
Conversation
ef0a8c7 to
e941bcb
Compare
There was a problem hiding this comment.
Pull request overview
Refactors the program interaction UI to use a single Sails payload form component across constructors, queries, and functions, replacing the older “ServiceList / InitForm / MessageForm” flow.
Changes:
- Replaces
ServiceListwith a newSailsProgramActionsUI that groups services and actions and drives all submissions through the same payload form. - Introduces
SailsPayloadFormand supporting Sails UI components (SailsActionGroup,SailsAction) to standardize payload rendering/encoding/submission. - Updates program hooks (
useInitProgram,useSendProgramMessage,useSendInjectedTransaction) to accept a pre-parsedSailsinstance instead of building it internally, and updates supporting UI components/styles.
Reviewed changes
Copilot reviewed 39 out of 39 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| idea/vara-eth/frontend/src/pages/program/program.tsx | Switches program action rendering from ServiceList to SailsProgramActions. |
| idea/vara-eth/frontend/src/features/sails/lib.ts | Adds shared SailsAction type alongside useSails. |
| idea/vara-eth/frontend/src/features/sails/index.ts | Re-exports SailsProgramActions from the Sails feature entrypoint. |
| idea/vara-eth/frontend/src/features/sails/components/sails-program-actions/sails-program-actions.tsx | New top-level program-actions UI built on Sails actions/groups. |
| idea/vara-eth/frontend/src/features/sails/components/sails-program-actions/sails-program-actions.module.scss | Styles for the program actions tabs/list. |
| idea/vara-eth/frontend/src/features/sails/components/sails-program-actions/index.ts | Barrel export for SailsProgramActions. |
| idea/vara-eth/frontend/src/features/sails/components/sails-payload-form/sails-payload-form.tsx | New unified payload form component using @gear-js/sails-payload-form + RHF/Zod. |
| idea/vara-eth/frontend/src/features/sails/components/sails-payload-form/sails-payload-form.module.scss | Grid layout styles for the unified payload form. |
| idea/vara-eth/frontend/src/features/sails/components/sails-payload-form/index.ts | Barrel export for SailsPayloadForm. |
| idea/vara-eth/frontend/src/features/sails/components/sails-action/sails-action.tsx | New action row UI (expand/collapse + submit) built around SailsPayloadForm. |
| idea/vara-eth/frontend/src/features/sails/components/sails-action/sails-action.module.scss | Styles for the action row container/header/body. |
| idea/vara-eth/frontend/src/features/sails/components/sails-action/index.ts | Barrel export for SailsAction. |
| idea/vara-eth/frontend/src/features/sails/components/sails-action-group/sails-action-group.tsx | New grouping UI for actions per service/constructor section. |
| idea/vara-eth/frontend/src/features/sails/components/sails-action-group/sails-action-group.module.scss | Styles for the action group header/body. |
| idea/vara-eth/frontend/src/features/sails/components/sails-action-group/index.ts | Barrel export for SailsActionGroup. |
| idea/vara-eth/frontend/src/features/sails/components/index.ts | Updates Sails components barrel export to SailsProgramActions. |
| idea/vara-eth/frontend/src/features/sails/components/fieldset/fieldset.module.scss | Adjusts fieldset styling to match the new grid-based payload form layout. |
| idea/vara-eth/frontend/src/features/sails/components/sails-payload-fields/sails-payload-fields.tsx | Removes old payload-fields-only component in favor of SailsPayloadForm. |
| idea/vara-eth/frontend/src/features/sails/components/sails-payload-fields/index.ts | Removes barrel export for deleted payload-fields component. |
| idea/vara-eth/frontend/src/features/programs/ui/service-list/service-list.tsx | Deletes the old program service list UI. |
| idea/vara-eth/frontend/src/features/programs/ui/service-list/service-list.module.scss | Deletes styles for removed ServiceList. |
| idea/vara-eth/frontend/src/features/programs/ui/service-list/index.ts | Deletes barrel export for removed ServiceList. |
| idea/vara-eth/frontend/src/features/programs/ui/message-form/message-form.tsx | Deletes old per-message form implementation (replaced by Sails UI). |
| idea/vara-eth/frontend/src/features/programs/ui/message-form/message-form.module.scss | Deletes styles for removed MessageForm. |
| idea/vara-eth/frontend/src/features/programs/ui/message-form/index.ts | Deletes barrel export for removed MessageForm. |
| idea/vara-eth/frontend/src/features/programs/ui/init-form/init-form.tsx | Deletes old init form implementation (replaced by Sails UI). |
| idea/vara-eth/frontend/src/features/programs/ui/init-form/index.ts | Deletes barrel export for removed InitForm. |
| idea/vara-eth/frontend/src/features/programs/ui/index.ts | Removes ServiceList export from programs UI barrel. |
| idea/vara-eth/frontend/src/features/programs/lib/index.ts | Stops exporting useSails from programs hooks barrel. |
| idea/vara-eth/frontend/src/features/programs/lib/hooks/use-send-program-message.ts | Refactors hook to accept Sails instance rather than constructing it from IDL. |
| idea/vara-eth/frontend/src/features/programs/lib/hooks/use-send-injected-transaction.ts | Refactors hook to accept Sails instance rather than constructing it from IDL. |
| idea/vara-eth/frontend/src/features/programs/lib/hooks/use-init-program.ts | Refactors hook to accept Sails instance; returns mutation result directly. |
| idea/vara-eth/frontend/src/features/programs/lib/hooks/index.ts | Removes useSails export from hooks barrel. |
| idea/vara-eth/frontend/src/features/programs/index.ts | Removes ServiceList from programs feature exports. |
| idea/vara-eth/frontend/src/components/ui/expandable-item/expandable-item.tsx | Simplifies ExpandableItem API by removing nesting support. |
| idea/vara-eth/frontend/src/components/ui/expandable-item/expandable-item.module.scss | Removes nested styling for ExpandableItem. |
| idea/vara-eth/frontend/src/components/ui/button/button.tsx | Adjusts prop handling to forward standard button attributes via ...props. |
| idea/vara-eth/frontend/src/components/form/checkbox/checkbox.tsx | Adds className support to style checkbox container. |
| idea/vara-eth/frontend/src/app/app.css | Adds global button reset styles and heading font inheritance adjustments. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...a-eth/frontend/src/features/sails/components/sails-program-actions/sails-program-actions.tsx
Show resolved
Hide resolved
idea/vara-eth/frontend/src/features/sails/components/sails-action/sails-action.tsx
Show resolved
Hide resolved
31c185e to
ad8bfab
Compare
045e49a to
33a6f2a
Compare
ad8bfab to
fe816bd
Compare
fe816bd to
a5577bb
Compare
vraja-nayaka
approved these changes
Jan 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.