GitHub Copilot app: Stack sessions and pull requests for better workflows

Share

Take a look at this screenshot from the GitHub Copilot app. It’s a tiny image packed with icons, and it tells a story I’m genuinely excited to share.

Screenshot of stacked sessions. They start with a folder 'Cass-kit', with 'Frontend modernization' below, and 'modernize frontend styles', 'Style port onto dev', and 'Remove react-bootstrap' all below.

What you’re seeing is a set of stacked sessions: a sequence of tasks in the same repository where each session builds directly on the one before it.

I’ll explain those in a moment. First, why is this screenshot so meaningful? Let’s go back over a decade. I have a personal app that I built around the end of 2014. It’s essentially a life dashboard that ties together calendars, smart home devices, and task management. It has served its purpose well, but maintenance has become increasingly painful.

My dependencies were badly outdated. Embarrassingly so. The project was running React 15 (released in 2016), Less for CSS preprocessing, and a react-bootstrap version from that same era. Yes, Bootstrap. It was that old.

Before AI, untangling this would have taken weeks. I had tried and given up previously. The app isn’t huge, but it’s just large enough that a manual effort felt overwhelming and not worth the payoff.

But AI is available now, so I opened the GitHub Copilot app, added my repo, and started working.

First step: Could I one-shot this?

No.

I did try, though. Here’s the prompt I used in Plan mode:

I want to modernize the frontend for this project. I first wrote a lot of this code more than 10 years ago and it should be cleaned up a lot. I'm thinking we start either using Tailwind or just vanilla CSS (please vet everything to help me decide), we remove all Less (etc), and clean everything up accessibility-wise and responsiveness-wise. Right now I really want to just focus on styles, and then slowly but surely organize and consolidate the React functionality. It might be worth modernizing dependencies, too. Let's come up with a plan around this before diving in. 
 
1. Nothing is sacred, it's okay if we have to completely start over some parts 
2. Links should change colors and add underlines on hover/focus 
3. Input boxes should have a smaller border radius in general, and their labels should be cleaner 
4. There should be good wrapping and a max-width on containers so that an input box doesn't span an entire wide monitor.

I ran it through Claude Opus 4.8, got a rubber duck review from GPT-5.5, and worked through quite a few back-and-forths to settle on a direction. Once I was satisfied, I hit “go” and let the app tackle the project to see what would happen.

It didn’t work, and the fault was mine.

Second step: Realizing I had tried this before

Remember when I mentioned I had “tried and given up before”? It turns out I had an old dev branch where I had already modernized parts of the app, and I hadn’t accounted for the compatibility issues that would surface.

That turned out to be a good thing.

When I ran the new version from this session, I saw that I was branching off main, but my current deployment was running the partially updated version on dev. That meant some features I had built for myself needed to be part of this change set. The differences were just significant enough that it made more sense to apply the new changes to the dev branch rather than pulling the dev changes into main.

Pre-AI, this would have been incredibly frustrating. I admit I was frustrated here too—I had spent time and tokens trying to make a decent plan work. But I was able to shift direction (and sessions) with a simple request, which was far smoother than I expected:

Screenshot of a conversation with Copilot. It starts with Copilot asking, 'Your decision when you're back (left to you — too consequential to guess): 1. Merge into main as-is, reconcile the master/dev fork separately; 2. re-apply just the styling + a11y improvements as a fresh branch off dev; 3. close this PR if dev's direction supersedes it. If you want option 2, I can start that port onto dev's Less + TypeScript structure.' Cassidy responds, 'Let's close this and start a new session as a fresh branch off of dev, yes.' Copilot responds, ' I'll close PR #573 and create a fresh session branched off dev to port the styling + a11y work.'

Nothing was wasted. Copilot created a new session, closed the pull request I had attempted, and ported my styling decisions into changes applied to the dev branch.

Third step: Findings after testing

I had a solid branch and a pull request I felt decent about. But as I started testing, I noticed old warnings in my console.

My heart sank when I saw references to findDOMNode and componentWillReceiveProps—functions I hadn’t touched in years. Ugh.

Those references weren’t from my code anymore; they were coming from react-bootstrap. I opened Plan mode again to decide whether an upgrade was feasible or if the library should be removed entirely:

Do you think we should remove react-bootstrap entirely (and replace with a modern alternative), or just upgrade/migrate existing components?

The plan that came back walked through the options and recommended replacing the library altogether.

Fourth step: Stacking a session on top of the other

I needed to keep my current changes safe, but removing react-bootstrap felt like significant scope creep for what I was already doing.

In my experience with agentic engineering, scope creep is hard to avoid. Since I don’t have to write every line myself, it’s tempting to create massive pull requests that handle everything at once. That’s really just a new kind of procrastination.

So instead of making one giant pull request, I broke the work up with a new session and prompted:

Let's make a pull request for the existing work, and then start a new session for this react-bootstrap replacement work that will branch off this existing work here, and be a separate pull request to merge into dev after this one. 

This is the part that felt magical enough to inspire this post. The GitHub Copilot app:

  1. Created a pull request for all my current changes off dev
  2. Created a “stacked session” for the react-bootstrap removal (it took the previous context, started a follow-up session, generated a plan, had me approve it, and ran)
  3. Created a stacked pull request on top of my existing work

That was incredibly cool. Stacked sessions and stacked pull requests? Is this the future?

Yes.

In case the name isn’t self-explanatory: a stack is a series of pull requests in the same repository where each pull request targets the branch of the pull request below it, forming an ordered chain that ultimately lands on your main branch.

In my case, not only did the sessions follow each other, but their changes did too.

Fifth step: Sailing off into the sunset with stacked pull requests

I know I’m being playful with my excitement, but it’s genuine. Shipping these changes felt effortless after years of neglecting my old codebase.

Let’s go back to that first screenshot, and I’ll walk you through it.

Screenshot of stacked sessions. They start with a folder 'Cass-kit', with 'Frontend modernization' below, and 'modernize frontend styles', 'Style port onto dev', and 'Remove react-bootstrap' all below.
  • At the top, you can see the repo I pulled in.
  • “Frontend modernization” is the initial session name.
  • The next nested layer is the first pull request attempt, which we ultimately didn’t ship (hence the red icon).
  • The layer beside it is where we got a working pull request for the dev branch.
  • The nested session below that is the draft pull request in progress, containing the react-bootstrap changes.

Software development has never been smooth. But this project became a whole lot easier with these modern tools.

If you’re planning to modernize your own codebases, give this approach a try.

Check out pull request stacks anywhere you commit code on GitHub, and stacked sessions in the GitHub Copilot app >

Read more