Skip to content

Commit ffab616

Browse files
Copilotsinedied
andcommitted
Update nickname display: 10 chars, no # prefix for nicknames
Co-authored-by: sinedied <[email protected]>
1 parent fb5fc66 commit ffab616

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/burger-api/openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ components:
547547
example: 'user123'
548548
nickname:
549549
type: string
550-
description: Optional nickname for the order (first 8 characters will be displayed in the dashboard)
550+
description: Optional nickname for the order (only first 10 chars displayed)
551551
example: 'John'
552552
items:
553553
type: array

packages/burger-mcp/src/tools.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export const tools = [
7979
description: 'Place a new order with burgers (requires userId)',
8080
schema: z.object({
8181
userId: z.string().describe('ID of the user placing the order'),
82-
nickname: z.string().optional().describe('Optional nickname for the order (first 8 characters will be displayed in the dashboard)'),
82+
nickname: z.string().optional().describe('Optional nickname for the order (only first 10 chars displayed)'),
8383
items: z
8484
.array(
8585
z.object({

packages/burger-webapp/src/components/burger-dashboard.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,15 @@ export class BurgerDashboard extends LitElement {
112112

113113
protected renderOrder = (order: BurgerOrder, isLeaving = false) => {
114114
const animClass = isLeaving ? 'fade-out' : '';
115-
const displayId = order.nickname ? order.nickname.slice(0, 8) : order.id.slice(-8);
115+
const displayId = order.nickname ? order.nickname.slice(0, 10) : `#${order.id.slice(-6)}`;
116116
return html`
117117
<div
118118
data-order-id="${order.id}"
119119
class="order-anim ${animClass}"
120120
@animationend=${isLeaving ? () => this.handleFadeOutEnd(order.id) : undefined}
121121
>
122122
<div class="${this.getOrderBoxClass(order)}">
123-
<div class="order-id">#${displayId}</div>
123+
<div class="order-id">${displayId}</div>
124124
<div class="order-status">
125125
<div class="order-status-inner">${this.getOrderDisplayStatus(order)}</div>
126126
</div>

0 commit comments

Comments
 (0)