You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "bujjibabukatta (via GitHub)" <gi...@apache.org> on 2026/06/13 08:43:02 UTC
[PR] [Feature][Lake] Add bulk scope config apply and cross-connection scope config sharing [devlake]
bujjibabukatta opened a new pull request, #8922:
URL: https://github.com/apache/devlake/pull/8922
## Summary
Closes #8896
This PR implements two related feature requests to improve scope config
management for users maintaining multiple projects/connections in a single
DevLake instance.
## Changes
### Feature 1 — Multi-select data scopes with bulk scope config apply
**File:** `config-ui/src/routes/blueprint/connection-detail/table.tsx`
- Added checkbox row selection to the data scope table
- Added a bulk action toolbar that appears when rows are selected, showing:
- Selected count badge
- "Apply Scope Config to Selected" button
- "Clear Selection" button
- Clicking the button opens a scope config picker modal
- The chosen scope config is applied to all selected data scopes in parallel
via existing `PATCH /plugins/{plugin}/connections/{connectionId}/scopes/{scopeId}`
### Feature 2 — Share scope configs across connections
**File:** `config-ui/src/plugins/components/scope-config-select/index.tsx`
**File:** `config-ui/src/api/scope-config/index.ts`
- Added `listAll` API function to fetch scope configs across all connections
for a plugin
- Added "This Connection Only / Showing: All Connections" toggle button in
the scope config picker
- Users can now reuse an existing scope config from any connection instead
of recreating it each time
## How to Test
1. Go to a Project → Blueprint → Connection detail page
2. Select multiple data scopes using the checkboxes
3. Click "Apply Scope Config to Selected" and pick a config → all selected
scopes should be updated
4. Click "Associate Scope Config" on any single scope → toggle
"This Connection Only" to "Showing: All Connections" → configs from
all connections should appear in the list
## No Backend Changes Required
The existing `ListScopeConfigs` backend handler already returns all scope
configs without filtering by `connection_id`. The frontend now exposes
this via the toggle.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Feature][Lake] Add bulk scope config apply and cross-connection scope config sharing [devlake]
Posted by "albusshirazi (via GitHub)" <gi...@apache.org>.
albusshirazi commented on code in PR #8922:
URL: https://github.com/apache/devlake/pull/8922#discussion_r3407960944
##########
config-ui/src/plugins/components/scope-config-select/index.tsx:
##########
@@ -37,13 +37,14 @@ export const ScopeConfigSelect = ({ plugin, connectionId, scopeConfigId, onCance
const [version, setVersion] = useState(1);
const [trId, setTrId] = useState<ID>();
const [open, setOpen] = useState(false);
+ const [showAll, setShowAll] = useState(false);
+
+ const { ready, data } = useRefreshData(() => showAll ? API.scopeConfig.listAll(plugin) : API.scopeConfig.list(plugin, connectionId),[version, showAll],);
- const { ready, data } = useRefreshData(() => API.scopeConfig.list(plugin, connectionId), [version]);
-
- const dataSource = useMemo(
- () => (data ? (scopeConfigId ? [{ id: 'None', name: 'No Scope Config' }].concat(data) : data) : []),
- [data, scopeConfigId],
- );
+ const dataSource = useMemo(() => {
+ const filtered = showAll ? data : data;
Review Comment:
The ternary operator evaluates to `data` in both the `true` and `false` cases. This means `showAll` has no actual effect, and `filtered` will always just be `data`.
Did you forget to add the filtering logic here? If `showAll` is false, it should probably return a filtered subset of `data` rather than the whole array. If no filtering is intended yet, you can remove this ternary and the `showAll` dependency to keep it clean.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Feature][Lake] Add bulk scope config apply and cross-connection scope config sharing [devlake]
Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh commented on PR #8922:
URL: https://github.com/apache/devlake/pull/8922#issuecomment-4764433170
> Hey @klesh, honest answer — I'm not able to share screenshots right now and I hope that's okay. The good news is there's genuinely nothing visually surprising here — every component is something already in the codebase, antd Table, existing modal, standard buttons, just connected together to solve a real user problem. No new design, no backend changes, clean and contained. I've put real care into this one and I'd really appreciate your trust to get it merged
This is not about you, or trust. I am not familiar with the FE so it is hard for me to understand the change.
I have to be responsible for what I merge, I can merge if you could help me here or wait for someone who familiar with this part of the system to review the code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Feature][Lake] Add bulk scope config apply and cross-connection scope config sharing [devlake]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8922:
URL: https://github.com/apache/devlake/pull/8922#issuecomment-6512315697
This pull request has been closed because it has not had recent activity. You could reopen it if you try to continue your work, and anyone who are interested in it are encouraged to continue work on this pull request.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Feature][Lake] Add bulk scope config apply and cross-connection scope config sharing [devlake]
Posted by "bujjibabukatta (via GitHub)" <gi...@apache.org>.
bujjibabukatta commented on PR #8922:
URL: https://github.com/apache/devlake/pull/8922#issuecomment-4756892119
Hey @klesh, honest answer — I'm not able to share screenshots right now and I hope that's okay. The good news is there's genuinely nothing visually surprising here — every component is something already in the codebase, antd Table, existing modal, standard buttons, just connected together to solve a real user problem. No new design, no backend changes, clean and contained. I've put real care into this one and I'd really appreciate your trust to get it merged
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Feature][Lake] Add bulk scope config apply and cross-connection scope config sharing [devlake]
Posted by "bujjibabukatta (via GitHub)" <gi...@apache.org>.
bujjibabukatta commented on PR #8922:
URL: https://github.com/apache/devlake/pull/8922#issuecomment-4778844702
Hi @albusshirazi could you please approve and merge pull request ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Feature][Lake] Add bulk scope config apply and cross-connection scope config sharing [devlake]
Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh commented on PR #8922:
URL: https://github.com/apache/devlake/pull/8922#issuecomment-4700902951
Good work!
Could you please attach some screenshots to demonstrate the design? Thanks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Feature][Lake] Add bulk scope config apply and cross-connection scope config sharing [devlake]
Posted by "albusshirazi (via GitHub)" <gi...@apache.org>.
albusshirazi commented on code in PR #8922:
URL: https://github.com/apache/devlake/pull/8922#discussion_r3408172640
##########
config-ui/src/plugins/components/scope-config-select/index.tsx:
##########
@@ -37,14 +37,18 @@ export const ScopeConfigSelect = ({ plugin, connectionId, scopeConfigId, onCance
const [version, setVersion] = useState(1);
const [trId, setTrId] = useState<ID>();
const [open, setOpen] = useState(false);
-
- const { ready, data } = useRefreshData(() => API.scopeConfig.list(plugin, connectionId), [version]);
+ const [showAll, setShowAll] = useState(false);
+
+ const { ready, data } = useRefreshData(
+ () => showAll ? API.scopeConfig.listAll(plugin) : API.scopeConfig.list(plugin, connectionId),
+ [version, showAll],
+ );
const dataSource = useMemo(
() => (data ? (scopeConfigId ? [{ id: 'None', name: 'No Scope Config' }].concat(data) : data) : []),
- [data, scopeConfigId],
+ [data, scopeConfigId, showAll],
Review Comment:
Looks much better! Moving the `showAll` check into the data fetcher clarifies the intent perfectly.
Just one minor cleanup detail on line 49:
`[data, scopeConfigId, showAll]`,
You can remove `showAll` from this dependency array. Since `showAll` is no longer referenced inside the `useMemo` callback on line 48, keeping it in the array is unnecessary and will flag a React hooks exhaustive-deps linting warning.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Feature][Lake] Add bulk scope config apply and cross-connection scope config sharing [devlake]
Posted by "bujjibabukatta (via GitHub)" <gi...@apache.org>.
bujjibabukatta commented on PR #8922:
URL: https://github.com/apache/devlake/pull/8922#issuecomment-4698922442
Hi @albusshirazi
Thanks for the feedback. You're right — the ternary expression was effectively redundant since both branches returned the same data.
I've removed the unnecessary ternary and the showAll dependency from the memo. The filtering logic is already handled server-side in useRefreshData, which switches between listAll and list based on the value of showAll, so no additional client-side filtering is required here.
I've pushed the changes. Could you please take another look and let me know if everything looks good?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Feature][Lake] Add bulk scope config apply and cross-connection scope config sharing [devlake]
Posted by "bujjibabukatta (via GitHub)" <gi...@apache.org>.
bujjibabukatta commented on code in PR #8922:
URL: https://github.com/apache/devlake/pull/8922#discussion_r3408151850
##########
config-ui/src/plugins/components/scope-config-select/index.tsx:
##########
@@ -37,13 +37,14 @@ export const ScopeConfigSelect = ({ plugin, connectionId, scopeConfigId, onCance
const [version, setVersion] = useState(1);
const [trId, setTrId] = useState<ID>();
const [open, setOpen] = useState(false);
+ const [showAll, setShowAll] = useState(false);
+
+ const { ready, data } = useRefreshData(() => showAll ? API.scopeConfig.listAll(plugin) : API.scopeConfig.list(plugin, connectionId),[version, showAll],);
- const { ready, data } = useRefreshData(() => API.scopeConfig.list(plugin, connectionId), [version]);
-
- const dataSource = useMemo(
- () => (data ? (scopeConfigId ? [{ id: 'None', name: 'No Scope Config' }].concat(data) : data) : []),
- [data, scopeConfigId],
- );
+ const dataSource = useMemo(() => {
+ const filtered = showAll ? data : data;
Review Comment:
Thanks for the feedback! You're right — I've removed the dead ternary and showAll from the memo deps. The filtering is handled server-side in useRefreshData which already switches between listAll and list based on showAll, so no client-side filtering is needed in the memo.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Feature][Lake] Add bulk scope config apply and cross-connection scope config sharing [devlake]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #8922: [Feature][Lake] Add bulk scope config apply and cross-connection scope config sharing
URL: https://github.com/apache/devlake/pull/8922
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Feature][Lake] Add bulk scope config apply and cross-connection scope config sharing [devlake]
Posted by "albusshirazi (via GitHub)" <gi...@apache.org>.
albusshirazi commented on PR #8922:
URL: https://github.com/apache/devlake/pull/8922#issuecomment-4779669455
I agree with @klesh - please add screenshots explaining the change (I read the changes, there are not a lot but they do affect the ui&ux of Devlake and I think more sets of eyes should view them)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Feature][Lake] Add bulk scope config apply and cross-connection scope config sharing [devlake]
Posted by "bujjibabukatta (via GitHub)" <gi...@apache.org>.
bujjibabukatta commented on code in PR #8922:
URL: https://github.com/apache/devlake/pull/8922#discussion_r3408151850
##########
config-ui/src/plugins/components/scope-config-select/index.tsx:
##########
@@ -37,13 +37,14 @@ export const ScopeConfigSelect = ({ plugin, connectionId, scopeConfigId, onCance
const [version, setVersion] = useState(1);
const [trId, setTrId] = useState<ID>();
const [open, setOpen] = useState(false);
+ const [showAll, setShowAll] = useState(false);
+
+ const { ready, data } = useRefreshData(() => showAll ? API.scopeConfig.listAll(plugin) : API.scopeConfig.list(plugin, connectionId),[version, showAll],);
- const { ready, data } = useRefreshData(() => API.scopeConfig.list(plugin, connectionId), [version]);
-
- const dataSource = useMemo(
- () => (data ? (scopeConfigId ? [{ id: 'None', name: 'No Scope Config' }].concat(data) : data) : []),
- [data, scopeConfigId],
- );
+ const dataSource = useMemo(() => {
+ const filtered = showAll ? data : data;
Review Comment:
Thanks for the feedback! You're right — I've removed the dead ternary and showAll from the memo deps. The filtering is handled server-side in useRefreshData which already switches between listAll and list based on showAll, so no client-side filtering is needed in the memo.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Feature][Lake] Add bulk scope config apply and cross-connection scope config sharing [devlake]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8922:
URL: https://github.com/apache/devlake/pull/8922#issuecomment-6330498940
This pull request has been automatically marked as stale because it has not had recent activity for 120 days. It will be closed in 7 days if no further activity occurs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org