Skip to content

Commit e5f26e4

Browse files
dhasani23David Hasani
andauthored
fix(amazonq): ensure summary.md + icons saved, populate job history sooner, fix minor styling issues (#4928)
* fix(amazonq): add jobId to history tab and ensure summary/icons get saved * update changelog * fix failing test * fix lint issue * fix circular dep * address comments * remove unneeded await * small fix to error notifications --------- Co-authored-by: David Hasani <[email protected]>
1 parent c2f5371 commit e5f26e4

File tree

16 files changed

+380
-371
lines changed

16 files changed

+380
-371
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "Amazon Q Code Transformation: make jobId visible in job history tab at start of job and allow summary.md + icons to be saved when accepting changes"
4+
}

packages/amazonq/package.json

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -257,25 +257,20 @@
257257
}
258258
],
259259
"view/title": [
260-
{
261-
"command": "aws.amazonq.startTransformationInHub",
262-
"when": "view == aws.amazonq.transformationHub",
263-
"group": "navigation@1"
264-
},
265260
{
266261
"command": "aws.amazonq.stopTransformationInHub",
267262
"when": "view == aws.amazonq.transformationHub",
268-
"group": "navigation@2"
263+
"group": "navigation@1"
269264
},
270265
{
271266
"command": "aws.amazonq.showPlanProgressInHub",
272267
"when": "view == aws.amazonq.transformationHub",
273-
"group": "navigation@3"
268+
"group": "navigation@2"
274269
},
275270
{
276271
"command": "aws.amazonq.showHistoryInHub",
277272
"when": "view == aws.amazonq.transformationHub",
278-
"group": "navigation@4"
273+
"group": "navigation@3"
279274
},
280275
{
281276
"command": "aws.amazonq.transformationHub.summary.reveal",
@@ -601,12 +596,6 @@
601596
"category": "Amazon Q (Developer)",
602597
"enablement": "aws.isDevMode"
603598
},
604-
{
605-
"command": "aws.amazonq.startTransformationInHub",
606-
"title": "Start Transformation",
607-
"icon": "$(play)",
608-
"enablement": "gumby.isTransformAvailable"
609-
},
610599
{
611600
"command": "aws.amazonq.stopTransformationInHub",
612601
"title": "Stop Transformation",
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
@keyframes spin {
2+
0% {
3+
transform: rotate(0deg);
4+
}
5+
100% {
6+
transform: rotate(360deg);
7+
}
8+
}
9+
body {
10+
margin: 0;
11+
padding: 0 1em;
12+
height: 100vh;
13+
}
14+
15+
.wrapper {
16+
height: 100%;
17+
display: flex;
18+
}
19+
20+
.spinner {
21+
display: inline-block;
22+
animation: spin 1s infinite;
23+
}
24+
25+
.column--container,
26+
.substep-container {
27+
display: flex;
28+
flex-direction: row;
29+
}
30+
31+
.column {
32+
flex-grow: 1;
33+
}
34+
35+
.substep-container p {
36+
margin: 0.5em 0;
37+
}
38+
39+
.step,
40+
.simple-step {
41+
padding: 0.5em 0 0.5em 0;
42+
margin: 0;
43+
}
44+
45+
.step {
46+
padding-left: 20px;
47+
}
48+
49+
.step:hover,
50+
.step.active {
51+
color: var(--vscode-editor-selectionForeground, inherit);
52+
background-color: var(--vscode-editor-selectionBackground, aliceblue);
53+
}
54+
55+
#stepdetails {
56+
width: 40%;
57+
padding: 0 20px;
58+
border-left: solid rgba(230, 230, 230, 0.5);
59+
min-height: 100vh;
60+
display: block;
61+
}
62+
63+
#progress {
64+
width: 60%;
65+
}
66+
67+
.status-PENDING {
68+
color: grey;
69+
}
70+
71+
.status-COMPLETED {
72+
color: green;
73+
}
74+
75+
.status-FAILED {
76+
color: red;
77+
}
78+
79+
.substep {
80+
display: none;
81+
}
82+
83+
.substep-icon {
84+
padding: 0 1em;
85+
}
86+
87+
.visible {
88+
display: block;
89+
}
90+
91+
.center {
92+
position: absolute;
93+
top: 50%;
94+
transform: translate(0, -50%);
95+
}
96+
97+
.center-flex {
98+
display: flex;
99+
align-items: center;
100+
justify-content: center;
101+
}
102+
103+
#step-duration {
104+
color: grey;
105+
}

packages/core/src/amazonq/webview/ui/tabs/generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class TabDataGenerator {
2828
['unknown', 'Ask a question or enter "/" for quick actions'],
2929
['cwc', 'Ask a question or enter "/" for quick actions'],
3030
['featuredev', 'Briefly describe a task or issue'],
31-
['gumby', 'Chat is disabled during Code Transformation.'],
31+
['gumby', 'Open a new tab to chat with Q'],
3232
])
3333

3434
private tabWelcomeMessage: Map<TabType, string> = new Map([

packages/core/src/amazonqGumby/activation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ export async function activate(context: ExtContext) {
5555
}),
5656

5757
Commands.register('aws.amazonq.showHistoryInHub', async () => {
58-
transformationHubViewProvider.updateContent('job history', 0) // 0 is dummy value for startTime - not used
58+
await transformationHubViewProvider.updateContent('job history')
5959
}),
6060

6161
Commands.register('aws.amazonq.showPlanProgressInHub', async (startTime: number) => {
62-
transformationHubViewProvider.updateContent('plan progress', startTime)
62+
await transformationHubViewProvider.updateContent('plan progress', startTime)
6363
}),
6464

6565
Commands.register('aws.amazonq.showTransformationPlanInHub', async () => {

packages/core/src/amazonqGumby/chat/controller/controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ export class GumbyController {
319319
private async processHumanChatMessage(data: { message: string; tabID: string }) {
320320
this.messenger.sendUserPrompt(data.message, data.tabID)
321321
this.messenger.sendChatInputEnabled(data.tabID, false)
322-
this.messenger.sendUpdatePlaceholder(data.tabID, 'Chat is disabled during Code Transformation.')
322+
this.messenger.sendUpdatePlaceholder(data.tabID, 'Open a new tab to chat with Q')
323323

324324
const session = this.sessionStorage.getSession()
325325
switch (session.conversationState) {

packages/core/src/amazonqGumby/telemetry/codeTransformTelemetry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ export const javapOutputToTelemetryValue = (javapCommandLineOutput: string) => {
8989
}
9090
}
9191

92-
export const calculateTotalLatency = (startTime: number, endTime: number = Date.now()): number => endTime - startTime
92+
export const calculateTotalLatency = (startTime: number): number => Date.now() - startTime

packages/core/src/amazonqGumby/telemetry/codeTransformTelemetryState.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { randomUUID } from '../../common/crypto'
88
interface ICodeTransformTelemetryState {
99
sessionId: string
1010
sessionStartTime: number
11-
resultStatus: string
1211
}
1312

1413
export class CodeTransformTelemetryState {
@@ -18,23 +17,18 @@ export class CodeTransformTelemetryState {
1817
this.mainState = {
1918
sessionId: randomUUID(),
2019
sessionStartTime: Date.now(),
21-
resultStatus: '',
2220
}
2321
}
2422

2523
public getSessionId = () => this.mainState.sessionId
2624
public getStartTime = () => this.mainState.sessionStartTime
27-
public getResultStatus = () => this.mainState.resultStatus
2825

2926
public setSessionId = () => {
3027
this.mainState.sessionId = randomUUID()
3128
}
3229
public setStartTime = () => {
3330
this.mainState.sessionStartTime = Date.now()
3431
}
35-
public setResultStatus = (newValue: string) => {
36-
this.mainState.resultStatus = newValue
37-
}
3832

3933
static #instance: CodeTransformTelemetryState
4034

0 commit comments

Comments
 (0)