Skip to content

Vegalite Demo#1249

Draft
wrenj wants to merge 3 commits intomainfrom
vegalite
Draft

Vegalite Demo#1249
wrenj wants to merge 3 commits intomainfrom
vegalite

Conversation

@wrenj
Copy link
Copy Markdown
Collaborator

@wrenj wrenj commented Apr 21, 2026

No description provided.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces Vega-Lite support to the Rizzcharts sample by updating agent instructions, adding catalog definitions, and implementing a new Angular rendering component. Review feedback identifies several areas for improvement, including the removal of debug print/log statements and commented-out code, and the need for unit tests for the new component to comply with the repository style guide. Concerns were also raised regarding the fragility of the post-install build script and the potential for invalid URLs if Markdown syntax is used in system instructions.

Comment on lines +236 to +238
s = "\n\n".join(parts)
print("System prompt: \n" + s)
return s
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.

high

Debug print statements should not be included in the SDK source code. This information should be handled by a logging framework if necessary.

Suggested change
s = "\n\n".join(parts)
print("System prompt: \n" + s)
return s
return "\n\n".join(parts)

Comment on lines +74 to +77
* **Cars**: `"url": "[https://vega.github.io/vega-lite/examples/data/cars.json](https://vega.github.io/vega-lite/examples/data/cars.json)"`
* *Schema*: `Name` (str), `Miles_per_Gallon` (num), `Cylinders` (num), `Displacement` (num), `Horsepower` (num), `Weight_in_lbs` (num), `Acceleration` (num), `Year` (date), `Origin` (str). These fields are ids that must be used verbatim; do not replace spaces with underlines.
* **Movies**: `"url": "[https://vega.github.io/vega-lite/examples/data/movies.json](https://vega.github.io/vega-lite/examples/data/movies.json)"`
* *Schema*: `Title` (str), `US Gross` (num), `Worldwide Gross` (num), `US DVD Sales` (num), `Production Budget` (num), `Release Date` (str), `MPAA Rating` (str), `Running Time min` (num), `Distributor` (str), `Source` (str), `Major Genre` (str), `Creative Type` (str), `Director` (str), `Rotten Tomatoes Rating` (num), `IMDB Rating` (num), `IMDB Votes` (num). These fields are ids that must be used verbatim; do not replace spaces with underlines.
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.

medium

The system instructions use Markdown link syntax for URLs (e.g., [url](url)). This can lead the LLM to include the Markdown brackets and parentheses in the generated JSON, resulting in invalid URLs in the Vega-Lite specification. It is recommended to provide the raw URL strings instead.

Comment on lines +366 to +367
# get_store_sales,
# get_sales_data,
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.

medium

Commented-out code should be removed to keep the codebase clean and maintainable.

"demo:restaurant": "npm run build:renderer && concurrently -k -n \"AGENT,WEB\" -c \"magenta,blue\" \"npm run serve:agent:restaurant\" \"npm start -- restaurant\"",
"demo:rizzcharts": "npm run build:renderer && concurrently -k -n \"AGENT,WEB\" -c \"magenta,blue\" \"npm run serve:agent:rizzcharts\" \"npm start -- rizzcharts\"",
"run:rizzcharts": "concurrently -k -n \"AGENT,WEB\" -c \"magenta,blue\" \"npm run serve:agent:rizzcharts\" \"npm start -- rizzcharts\"",
"postinstall": "npm run build:renderer",
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.

medium

The postinstall script executes a build process for external components using relative paths. This makes the installation process heavy and fragile, as it assumes a specific directory structure that might not be present in all environments (e.g., CI/CD). Consider moving this to a separate initialization or build script.

if (json.contextId || json.result?.contextId) {
this.contextId = json.contextId || json.result?.contextId;
}
console.log("Received response: " + JSON.stringify(json, null, 2));
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.

medium

Remove debug console.log statements before merging.

* limitations under the License.
*/

import { Component, Input, ViewChild, ElementRef, OnChanges, SimpleChanges } from '@angular/core';
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.

medium

According to the Repository Style Guide (line 17), code changes should have tests. Please add unit tests for the new A2uiVegaChartComponent to ensure it correctly handles specification changes and interacts with the Vega-Lite library as expected.

References
  1. If there are code changes, code should have tests. (link)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant