Skip to content

Commit 8f45cad

Browse files
committed
fix: standardize formatting and improve button click handling in ChatView component
1 parent 394fd0b commit 8f45cad

2 files changed

Lines changed: 24 additions & 24 deletions

File tree

.github/copilot-instructions.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -215,14 +215,14 @@ A single **multi-tenant** Microsoft Entra ID app registration (`Azure FinOps Age
215215

216216
**Consent Tiers** (each triggers a separate Microsoft Entra ID consent screen — all delegated, read-only):
217217

218-
| Tier value | Button | Scopes | Resource |
219-
| ------------------ | ------------------------------- | ----------------------------------------------------------- | ----------------- |
220-
| `base` (default) | **Connect Azure** | `user_impersonation` | Azure ARM |
221-
| `licenses` | **+ License Optimization** | `User.Read`, `Organization.Read.All`, `Reports.Read.All` | Microsoft Graph |
222-
| `chargeback` | **+ Cost Allocation** | `User.Read`, `User.Read.All`, `Group.Read.All` | Microsoft Graph |
223-
| `loganalytics` | **+ Log Analytics** | `Data.Read` | Log Analytics API |
224-
| `storage` | **+ Cost Exports** | `user_impersonation` | Azure Storage |
225-
| `all` (chain) | **🛡 Grant all remaining add-ons** | _Walks the user through every not-yet-consented add-on tier in sequence._ Each remaining tier's consent screen appears one after another; the callback redirects to the next pending tier until done. Entra v2 will not combine cross-resource scopes into one consent for a non-admin delegated flow, so sequential is the correct pattern. | (chain) |
218+
| Tier value | Button | Scopes | Resource |
219+
| ---------------- | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- |
220+
| `base` (default) | **Connect Azure** | `user_impersonation` | Azure ARM |
221+
| `licenses` | **+ License Optimization** | `User.Read`, `Organization.Read.All`, `Reports.Read.All` | Microsoft Graph |
222+
| `chargeback` | **+ Cost Allocation** | `User.Read`, `User.Read.All`, `Group.Read.All` | Microsoft Graph |
223+
| `loganalytics` | **+ Log Analytics** | `Data.Read` | Log Analytics API |
224+
| `storage` | **+ Cost Exports** | `user_impersonation` | Azure Storage |
225+
| `all` (chain) | **🛡 Grant all remaining add-ons** | _Walks the user through every not-yet-consented add-on tier in sequence._ Each remaining tier's consent screen appears one after another; the callback redirects to the next pending tier until done. Entra v2 will not combine cross-resource scopes into one consent for a non-admin delegated flow, so sequential is the correct pattern. | (chain) |
226226

227227
The single source of truth for tier → scopes mapping is `GetScopesForTier()` in `Program.cs`. The `tier=all` chain logic lives in the `/auth/microsoft` handler (builds `auth_chain` session list) and the callback (consumes one chain entry per redirect).
228228

src/Dashboard/client/src/components/ChatView.vue

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@
415415
:disabled="licensesEnabled"
416416
@click="
417417
!licensesEnabled &&
418-
startAuth('azure', '/auth/microsoft?tier=licenses')
418+
startAuth('azure', '/auth/microsoft?tier=licenses')
419419
"
420420
:title="
421421
licensesEnabled
@@ -449,7 +449,7 @@
449449
:disabled="chargebackEnabled"
450450
@click="
451451
!chargebackEnabled &&
452-
startAuth('azure', '/auth/microsoft?tier=chargeback')
452+
startAuth('azure', '/auth/microsoft?tier=chargeback')
453453
"
454454
:title="
455455
chargebackEnabled
@@ -485,7 +485,7 @@
485485
:disabled="logAnalyticsEnabled"
486486
@click="
487487
!logAnalyticsEnabled &&
488-
startAuth('azure', '/auth/microsoft?tier=loganalytics')
488+
startAuth('azure', '/auth/microsoft?tier=loganalytics')
489489
"
490490
:title="
491491
logAnalyticsEnabled
@@ -518,7 +518,7 @@
518518
:disabled="storageEnabled"
519519
@click="
520520
!storageEnabled &&
521-
startAuth('azure', '/auth/microsoft?tier=storage')
521+
startAuth('azure', '/auth/microsoft?tier=storage')
522522
"
523523
:title="
524524
storageEnabled
@@ -568,8 +568,8 @@
568568
>
569569
<span class="scope-grant-all-desc"
570570
>Chains through each remaining consent automatically. Same
571-
delegated permissions, no clicking back into the app
572-
between each.</span
571+
delegated permissions, no clicking back into the app between
572+
each.</span
573573
>
574574
</span>
575575
</button>
@@ -1352,13 +1352,13 @@
13521352
<script setup>
13531353
import * as echarts from "echarts";
13541354
import {
1355-
computed,
1356-
nextTick,
1357-
onBeforeUnmount,
1358-
onMounted,
1359-
reactive,
1360-
ref,
1361-
watch,
1355+
computed,
1356+
nextTick,
1357+
onBeforeUnmount,
1358+
onMounted,
1359+
reactive,
1360+
ref,
1361+
watch,
13621362
} from "vue";
13631363
13641364
const props = defineProps({
@@ -3331,9 +3331,9 @@ async function send() {
33313331
gap: 8px;
33323332
}
33333333
.portal-header-email {
3334-
font-size: 12px;
3334+
font-size: 14px;
3335+
font-weight: 600;
33353336
color: #fff;
3336-
opacity: 0.9;
33373337
white-space: nowrap;
33383338
overflow: hidden;
33393339
text-overflow: ellipsis;
@@ -3979,7 +3979,7 @@ async function send() {
39793979
color: #005a9e;
39803980
}
39813981
.scope-row-perms {
3982-
font-family: 'Cascadia Code', 'Consolas', monospace;
3982+
font-family: "Cascadia Code", "Consolas", monospace;
39833983
font-size: 10px;
39843984
color: #8a8886;
39853985
margin-top: 2px;

0 commit comments

Comments
 (0)