Skip to content

feat(usecases): add subsystem-filtered GKV query - #139

Open
tmohakul wants to merge 1 commit into
AudioReach:feature/use-case-designerfrom
tmohakul:refactor-edit-session
Open

tmohakul wants to merge 1 commit into
AudioReach:feature/use-case-designerfrom
tmohakul:refactor-edit-session

Conversation

@tmohakul

@tmohakul tmohakul commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Add the subsystem-filtered usecase query endpoint as an extension of the existing usecase query API:

GET /arc-api/v1/projects/:projectId/usecases/filtered-by-subsystem

  • Reuse existing usecase filters and edit-session overlays.
  • Apply nested subsystem filtered-GKV transformation.
  • Group usecases with identical filtered GKV values.
  • Reuse NodeOverlayFetcher for effective topology.
  • Support shared subgraphs, hierarchy-root handling, and raw-GKV fallback.

@tmohakul
tmohakul requested review from a team September 8, 2026 07:58
@tmohakul
tmohakul force-pushed the refactor-edit-session branch from d49e56e to 607927e Compare September 8, 2026 14:09

// ── Subsystem / UseCase ───────────────────────────────────────────────────
Subsystem: 'Subsystem',
SubsystemFilteredKey: 'SubsystemFilteredKey',

@NithinSimon NithinSimon Sep 8, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this the table holding keys assigned to subsystem?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes , it stores subsystem system ID → key-definition system IDs

@tmohakul
tmohakul force-pushed the refactor-edit-session branch from 607927e to e1e85e0 Compare September 9, 2026 07:57
Add the subsystem-filtered usecase query endpoint as an extension
of the existing usecase query API:

GET /arc-api/v1/projects/:projectId/usecases/filtered-by-subsystem

Reuse existing usecase filters and edit-session overlays.
Apply nested subsystem filtered-GKV transformation.
Group usecases with identical filtered GKV values.
Reuse NodeOverlayFetcher for effective topology.
Support shared subgraphs, hierarchy-root handling, and raw-GKV
   fallback.

Signed-off-by: Tapan Mohakul <tmohakul@qti.qualcomm.com>
@tmohakul
tmohakul force-pushed the refactor-edit-session branch from e1e85e0 to 78869af Compare September 9, 2026 17:06
Manual = 'Manual',
}

export class SubsystemFilteredKvDto {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be defined as zod schema in Core right?

};
}

function toApiUsecase(uc: UseCaseReadModel) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this dto should be returned from core handler.

'- Parentheses for grouping: `subsystemId:value1 AND (subsystemId:value2 OR subsystemId:value3)`\n\n' +
'**Valid Fields:**\n' +
'- `subsystemId`: Subsystem system ID (only field supported by this endpoint)\n\n' +
'- `subsystemId`: Subsystem system ID\n' +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

filter is on natural ids only, lets fix comment and implementation

// 4. Return organized hierarchy
const query = new GetSubsystemFilteredUsecasesQuery(
parsedProjectId,
'client-id', // TODO: get actual clientId from JWT

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

authentication is already enabled, check other APIs and use accordingly.

if (!subsystem) continue;
filteredGkv.push({
key: {
systemId: SUBSYSTEM_FILTERED_KEY_ID,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

systemId doesnt make sense for subsystem. Should we use different dto to send back this info?

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.

3 participants