Validating modifications made by AI agents typically requires navigating across multiple windows and applications. The GitHub Copilot app consolidates this workflow by placing diff viewing, command execution, and web preview capabilities directly within a single interface.
When an agent modifies your codebase, three critical tasks follow: examining what changed, executing the updated code, and verifying the results function as intended. The Copilot app now enables all three activities in one location, eliminating the need to alternate between your code editor, command-line terminal, and web browser.
By consolidating these workflows into adjacent panels within the application, developers can efficiently validate agent-generated work without constant context switching. Let's examine how each panel functions within the AI-assisted coding workflow.
Reviewing changes with the diff panel
A diff panel displays a side-by-side comparison showing precisely which lines were inserted, deleted, or modified. Additions appear in green while removals display in red, providing immediate visual clarity.
This transparency puts you in charge of the next steps. You retain the ability to approve modifications, add feedback, or request that Copilot revise the implementation. Final authority over all changes remains with you.
Executing code via the terminal panel
While reviewing code provides insight, actually running it delivers confirmation. The terminal panel embedded in the Copilot app allows you to execute commands directly within your session. The process is straightforward—typically you're running the project's built-in commands and observing the output.
You can execute code manually or set up a script accessible through the Run button. Consider a web development scenario as an illustration:
- Configure a dev server script that navigates to the client directory and executes npm run dev
- Select Run to launch the development server for your website
Multiple terminal sessions can operate simultaneously, allowing you to switch between them and continue issuing commands as needed.
Testing with the browser panel and Pick & Polish tool
For projects with user-facing interfaces, the browser panel completes the validation cycle. In the website example mentioned above, this panel enables you to launch and test your new functionality as an actual user would experience it.
Should you wish to refine further, the Pick & Polish tool lets you select specific interface elements and request adjustments from the agent.
After making modifications, you can rerun the dev server script to observe the updates.
Completing the AI code validation cycle
After examining the diff, launching the project in the terminal, testing it in the browser, and refining it through iteration, you can finalize the change directly within the Copilot app and initiate a pull request. Accomplishing this entire process from a single interface eliminates tab switching, application hopping, and the risk of losing your workflow position.
Having review, execution, and preview capabilities adjacent to each other transforms agent-generated modifications from uncertain to trustworthy, because you can validate that your merged code actually functions.
Key questions to ask before accepting agent changes
The three integrated panels address the essential questions you should pose before approving any agent-generated modifications:
- What's changed?
- Does it run?
- And does it actually work?
Working through this checklist before accepting agent-generated code ensures you comprehend the modifications and whether they perform according to your requirements, keeping you firmly in control.
Source: GitHub Blog