Claude Code for Product Designers
Lesson 28 of 49, 0 of 49 lessons completed
Sign in
Watch on YouTubePlay

Plays from YouTube. Google's privacy policy (opens in a new tab) applies.

Up next

2.14 Merging parallel work

Next lesson in 8 s

2.13 Two sessions: motion and an audit

Adam runs two sessions side by side: a cloud session audits the app's accessibility while a local one adds Motion animations to the toast, dialogs and bottom sheet. He answers both sessions' questions, then reviews the motion in Claude's built-in browser and the cloud work in Vercel's preview of its branch.

What you'll learn

  1. Start a cloud session on the right repo and on main; it works on its own claude/… branch.
  2. Name a library exactly ("Motion, formerly Framer Motion") so Claude knows what you mean; it's spring-based rather than easing-based.
  3. End a brief with "explore, plan, ask me questions, then execute", so you stay involved.
  4. A coloured dot in the sidebar shows which session needs your attention.
  5. Accessibility findings are design decisions: contrast (4.4:1 vs the needed 4.5:1), border tokens, error text.
  6. Every dependency adds upkeep and weight; a library that you'll reuse across the app earns its place, one for a single shiny effect doesn't.
  7. Review local work at localhost:3000 (or Claude's built-in browser); review cloud work via Vercel's preview of its branch after Claude pushes.
  8. A cloud session's machine sleeps; send a message to wake it and see its changed files.

Chapters

  1. 00:00Starting a cloud accessibility audit
  2. 02:54Starting the local motion session
  3. 05:04Answering the accessibility questions
  4. 08:04Choosing how the motion feels
  5. 11:42When a dependency earns its place
  6. 14:19Reviewing the motion locally
  7. 15:28Previewing cloud work on Vercel
  1. 00:00Okay, so now that we covered what cloud sessions are, let's kick things off.
  2. 00:04We're going to spin up two sessions.
  3. 00:07The first one in the cloud for that accessibility um pass and then I'm going to have another session here locally for um from like improving that motion layer of
  4. 00:17our application. Let's start with the cloud session.
  5. 00:20Um in the desktop application, first I need to make sure we are working in the cloud environment.
  6. 00:25So just open this up, make sure it's not set on this computer.
  7. 00:29It's on cloud, the default environment.
  8. 00:31Then we need to make sure we are on the right uh repository.
  9. 00:35And then uh also it's important to make sure we are going to be starting this session in the main branch, not any feature branch or anything else.
  10. 00:44Um I'm on Opus 5.5 medium effort.
  11. 00:47I think it's going to be enough for this.
  12. 00:48I'm in the plan mode because we are kicking uh a new thing off.
  13. 00:52So with that I'm just going to uh hit the mic button and let's see.
  14. 00:59Uh hey Claude, in this session I would like you to help me audit our accessibility um and make sure the application or the code base is compliant with all
  15. 01:09of the best practices for building accessible web applications.
  16. 01:14I'm looking to review things such as uh focus states, keyboard navigation, um aria labels, um contrast ratios for text, icons, backgrounds, um and whatever else you might come up
  17. 01:28with. Based on your findings, I will want you to write a plan for fixing those and I'm looking to tackle all of this in one PR.
  18. 01:41Okay. So um I'm expecting that Claude is going to um it's going to spin up a sub agent uh to do the audit and then it's going to confirm
  19. 01:53the findings and then it's going to write the plan for fixing those.
  20. 01:57And um I just made sure uh all of is going to be feasible to be tackled under one PR.
  21. 02:04So with that, I'm just going to hit sent.
  22. 02:06And we can see the session has been initialized.
  23. 02:10You can see, you know, some interesting things being different about this.
  24. 02:13So the moment you start a new cloud session, new cloud session, Claude is going to create a new branch and it's going to give it that distinctive name with
  25. 02:23Claude slash and then some random things over here.
  26. 02:27[snorts] That is just a very Claude thing to do.
  27. 02:30I don't think there is a way to change this, not right now at least.
  28. 02:34So this is going to be the name of the branch that Claude is currently working on.
  29. 02:38Each new session is basically a new branch.
  30. 02:41This way we can make sure that Claude is not going to be accidentally deleting files or changing files.
  31. 02:48It's not supposed to to do, okay?
  32. 02:52So with this happening in the background, I'm going to start off a new session.
  33. 02:55This one I need to have it on my computer.
  34. 02:58Let's make sure it's the right folder.
  35. 03:01I'm going to also switch over to the plan mode.
  36. 03:03And this time I think it's going to I'm going to stay on the high reasoning effort.
  37. 03:08So let's say, let's see.
  38. 03:11Hey Claude, in this session I would like us to enhance the motion layer of our application.
  39. 03:20I'm looking to import a motion library, formerly known as Framer Motion.
  40. 03:28And I'm looking to use it to enhance the animation in the toast component when it appears and comes off the screen and also our dialogues and bottom drawers on
  41. 03:41mobiles. Explore, plan, ask me questions if needed, and then execute with sub agents preferably.
  42. 03:54Okay, the explore, plan, ask me questions and then execute is is a thing that I like like putting in uh very often at the end.
  43. 04:04Uh specifically the ask me questions part.
  44. 04:07I really wants to be involved in this.
  45. 04:10Uh and uh so yeah, let's see.
  46. 04:12Oh, right. I'm also mentioning uh motion uh and then I further clarify that I what I mean is Framer Motion.
  47. 04:20It's that very popular um library that allows us to create a little bit like more refined animations with that are spring based and not easing based.
  48. 04:29Um so I need to make sure Claude knows what I mean.
  49. 04:33Again, all of the prompts are going to be able for you to grab, copy and paste um wherever you're watching this.
  50. 04:40So with that, I'm going to hit send.
  51. 04:42So both sessions are running in the back simultaneously.
  52. 04:47All are in the uh plan mode and in the left hand sidebar, I can see this red or orange dot that honestly might look differently um depending on when
  53. 04:58you're watching this video.
  54. 04:59But uh this is basically an indicator that there is something that requires my attention in that session.
  55. 05:04So let me head over it and see what it is.
  56. 05:08And what we have are our first set of questions.
  57. 05:11Wonderful. Um okay, so let's see.
  58. 05:14I've audited uh the UI files and checked the design token contrast.
  59. 05:18The codebase is already solid.
  60. 05:21On accessibility, uh a few real gaps remain and some fixes would move the design away from Figma.
  61. 05:28So I need your decision on those before I proceed.
  62. 05:31Wonderful. So let's see what it what it has found.
  63. 05:34So contrast uh content muted um okay.
  64. 05:39Okay, it's 4.421 on the page background and it needs 4.5.
  65. 05:45Okay, it's so close.
  66. 05:47But hey, this is why we are doing this.
  67. 05:49Okay. Uh unreserved striped cards.
  68. 05:52Again, contrast ratio insufficient.
  69. 05:54Um so uh it's used for field labels caption Okay, how should we fix it?
  70. 06:01Okay, change the color content muted to stone is 600 on uh everywhere.
  71. 06:06Um, you know what?
  72. 06:08I'm okay having just a slightly darker uh muted text color that shouldn't be uh any sort of harm.
  73. 06:14Uh let's see what's next.
  74. 06:16Uh input underline editable info field show only a one pixel border default uh which is against the background.
  75. 06:24Um hmm okay. Right.
  76. 06:28So I okay, let's see.
  77. 06:31So what I think Claude meant by that, let me delete that arrow.
  78. 06:36So what I think Claude is getting at is that these borders here are too faint basically.
  79. 06:43Um and you know what?
  80. 06:44Now that I'm looking at this with a fresh pair of eyes, perhaps he's onto something.
  81. 06:48So I'm going to I'm going to agreed I'm going to agree on hmm let's see.
  82. 06:53I guess I 'm going to go with the new color token.
  83. 06:56Um so I'm fine with this being slightly darker, but I wouldn't uh I wouldn't want to make these decorator borders darker at the same time.
  84. 07:07So let's go with the new uh border strong token as it's suggesting.
  85. 07:13Form errors. Uh right now an invalid submit only moves focus to an empty required field with no error text.
  86. 07:20Uh okay and this fails the WCAG uh um requirement because some screeners just here name required uh which fix do you want?
  87. 07:33Sure, let's go with the visible inline error.
  88. 07:35That is a good catch actually.
  89. 07:37Should the PR also add automated accessibility checks so regressions get caught?
  90. 07:42Uh typically I would probably lean towards saying yes, uh but that isn't really something I want us to get into at this stage of the video course.
  91. 07:51So I'm not going to go with any of these options.
  92. 07:54I will get into this a little bit later.
  93. 07:57So I'm going to hit submit and what's really nice about working with you know uh in parallel is that I have just finished you know answering questions in one
  94. 08:06session and the other session, the one that's like running locally on my machine is ready for me and has another four questions.
  95. 08:13But you can also I guess you can see like what I was getting at in the previous video when I was talking about that mental drain, right?
  96. 08:21So these are just two sessions, which is okay, but imagine having this kind of workflow with four or five sessions simultaneously.
  97. 08:30That isn't really sustainable, I think for most people.
  98. 08:34So what overall motion feel do you want across the toast dialogue and bottom sheet sheet?
  99. 08:40So we the options are soft spring, a crisp ease out, playful spring.
  100. 08:46You know what? I think for this kind of application, playful spring would be too much.
  101. 08:51Crisp ease out would really doesn't change that much from what we have right now or at least again in my implementation.
  102. 08:58So I'm going to go with the soft spring, which is the recommended recommended option here.
  103. 09:03How should the toast appear and lift?
  104. 09:06So drop in and lift out.
  105. 09:08Okay, that is that is almost on the edge of being too playful, but let's see.
  106. 09:14Desktop slides from right and then fade and scale only.
  107. 09:19You know what? I'm really interested to see how this first option is going to come out.
  108. 09:22So I'm going to go with that recommended option as well.
  109. 09:25How should the delete this booking dialogue animate?
  110. 09:28So scale plus fade, rise plus fade, fade only.
  111. 09:31I think I'm going to go with the rise and fade just to have a little bit of diversity in the motion layer.
  112. 09:38This is a video course after all.
  113. 09:39Let's have some fun while we are at it, okay?
  114. 09:43And then should the phone bottom sheet also be swiped to dismiss?
  115. 09:48Ooh, that would be interesting.
  116. 09:50Let me have a thing.
  117. 09:51Yes, drag down to close.
  118. 09:53You're going to pull the sheet down as a threshold or with a quick flick it closes, otherwise it springs back as a small grab handle to the top.
  119. 10:03I would keep it minimal with the existing border tokens.
  120. 10:08You You what? For that, I think would like to uh go back to our application.
  121. 10:14And I would actually want to take another look.
  122. 10:16I'm going to get into inspect.
  123. 10:19Right. So right now, uh there is no swipe to dismiss.
  124. 10:23Uh I can only dismiss by either either tapping here or uh in the or just clicking away.
  125. 10:30Um that would be I think a really nice pattern um considering that you are on a mobile device.
  126. 10:37So yeah, I think I'm going to go with yes and then let's see if we can refine this behavior.
  127. 10:44So I'm going to hit submit.
  128. 10:46And um the interrogation here is over.
  129. 10:48I can come back to the other session and I have a plan waiting for me on the things that we'll be working on.
  130. 10:54Wonderful. Um I'm just going to head over to and accept and use auto mode right away.
  131. 11:02Okay. Uh and I'm going to close the plan.
  132. 11:05And um Okay. And now Claude in the Claude in the Claude is doing its thing.
  133. 11:14Uh so let me go back to our local Claude.
  134. 11:16This one has a I guess arguably a little bit heavier of a heavier task.
  135. 11:22Also hence it's running on the high reasoning effort as opposed to the medium effort we have for the accessibility audit.
  136. 11:29Um so let's see.
  137. 11:31Uh oh, and the plan is ready.
  138. 11:33Again, at this point I'm just going to go ahead and accept and use auto mode and then I'm going to review it in the browser.
  139. 11:39Sometimes it's just a little bit easier uh to review things this way.
  140. 11:43And I'm also going to have a look at the files.
  141. 11:46So what is happening right now is we are installing a new motion library.
  142. 11:51We are adding one more dependency to our application.
  143. 11:55So if we were to do it like manually, we would do it through a terminal.
  144. 11:59Uh we would do it probably through uh something like npm add.
  145. 12:04Um and this would basically this is going to add a new thing that is going to be required that we have installed on our computer in order to build
  146. 12:14and run our application.
  147. 12:15Now motion is a bit of a uh like it's it's a little bit heavier of a a dependency and it's always a good idea whenever you are considering, you
  148. 12:25know, installing dependencies to be mindful about the cost that we are adding.
  149. 12:30So the more dependencies we have installed for all of the new and shiny things, the trickier it gets to maintain our application and the heavier the application gets and
  150. 12:39also the heavier it is to run on anybody's device.
  151. 12:44So that is something that's really uh that that is like it's it's good to be mindful of the fact basically.
  152. 12:51Again, this is um our first like more of the heavier dependency that we are adding.
  153. 12:58Uh I really like, you know, having cool and refined motion uh and, you know, uh a library of motion is something that we are going to be reusing in
  154. 13:06plenty of spaces no matter your application, so I think it earns its keep over here.
  155. 13:11Uh anything else uh like installing really heavy libraries or dependencies for just like one shiny effect on just one page or one like one confetti or any other celebratory
  156. 13:23effect, that is something that would probably give me a pause and I recommend uh that you also have that sort of um skepticism uh a little bit of skepticism
  157. 13:34towards just like right away right away installing new things just like that, okay?
  158. 13:40Uh that is also a very common uh sign of whether you're looking at uh just a very like lightly vibe coded application and code base whether over something that
  159. 13:51has been like really thought through.
  160. 13:54Uh so yeah, just a thing to know.
  161. 13:57And um as I'm talking here, Claude is doing all the work [laughter] as always.
  162. 14:03Uh let's see. Okay, both sessions are hard at work.
  163. 14:08So um I'm going to I 'm going to take a quick pause and we're going to see each other in very shortly.
  164. 14:18Okay, welcome back. Uh, both agents have review like finished their initial turns and it's time to review those.
  165. 14:24So we already know how to review the work of the local agent, the one that's running off of our, you know, local codebase.
  166. 14:31Uh, we have our dev server uh spin up.
  167. 14:34If you don't have one already, a reminder, you can always just head over to the terminal and just type in npm run dev and that should do it.
  168. 14:42Um, and then with that npm run dev, you can either just open up localhost 3000 on your in your like browser of choice or you can maybe try using
  169. 14:51that built-in browser which Claude has already opened up for me by default.
  170. 14:55Again, I'm going to dismiss um I'm going to dismiss the prompt for sharing cookies.
  171. 15:01Um, and yeah, I can like get through uh most of it uh or actually all of it.
  172. 15:07Uh, and let's see.
  173. 15:08I can try to make a confirmation.
  174. 15:11Ooh, I can see a new new animation for the toast and then it also has a slight out animation.
  175. 15:17Let's see uh the confirmation.
  176. 15:20Also, we have a nice really nice animation over here as well.
  177. 15:23And uh okay, it looks good.
  178. 15:25It looks good. Uh, few things uh that I would like to refine, but I'll take down take care of this a little bit later.
  179. 15:31But what about that cloud session, right?
  180. 15:33Uh, its work is nowhere to be found over here locally on localhost 3000 because it's a totally different branch, right?
  181. 15:40Uh, so if I get into localhost I mean I'm sorry, if I get into that local cloud session, I can see that branch name.
  182. 15:48So first thing that we need to know is that that branch is something that we will we will we will only be able to see on GitHub once Claude
  183. 15:57makes its first push.
  184. 15:59So it makes a comment and then it makes a push and only then we can actually get into GitHub and see that there indeed now is this new branch
  185. 16:07over here and we can double check and we can see it here.
  186. 16:10Actually, I'll need to refresh.
  187. 16:11Um, and I can see it's all it's over here.
  188. 16:16Uh, uh GitHub is not the best place to review it, right?
  189. 16:19But I also want to be able to see it over here on that Vercel application.
  190. 16:23So this is why the fact that we have connected um you know our Vercel to this GitHub repository is now such a handy thing because uh what Vercel is
  191. 16:33going to be doing it's going to create a new deployment for every single branch and every single push that we have over there at least these are the default
  192. 16:43settings which you can change if you want.
  193. 16:45What it means is that uh even though I'm not able to like preview this locally I can get into the browser over here.
  194. 16:52I can head over to Vercel, find the URL of this deployment and just open this up.
  195. 16:58Uh and the way to do it is by going into Vercel over here.
  196. 17:02I'm sorry going into Vercel over here.
  197. 17:05I'm going to get into this product right away and um I can see the deployments and I can see it's um it's ready over here and I can click
  198. 17:17preview and this is going to open up the spanky looking URL but this is okay.
  199. 17:22It's just a temporary thing and I can actually hit tab and I can see um and I can see you know uh some of the improvements we talked about
  200. 17:31like the borders here a little bit darker uh things such as let's see if I go and say John 1 2 3 4 5 and then if I uh
  201. 17:42delete and then delete booking my focus is no longer lost.
  202. 17:47This is one of the things that that Claude Asian has told me it has found as well.
  203. 17:52So that work is something I can review over here and I will be able to review this only in between different pushes.
  204. 17:59Um so with that I can still however get full access to all of the files that are being changed in this session.
  205. 18:08So all I have to do is head over here like click over here to the changes and it gives me a list of all of the files that have
  206. 18:14been modified. Now if you don't see anything over here it might be because it's been a while since your last message in that cloud sessions, um and you'll just
  207. 18:24have to wake it up again and you know there is going to be that virtual machine waking up again in the cloud and only then it's going to let
  208. 18:32you see like the files change over here.
  209. 18:35So just send a message and that's going to be it.
  210. 18:38Um okay so I have both things ready for me to review.
  211. 18:42What I'm going to do now is I'm going to you know refine things here and refine things over there and then I 'm going to follow the process which
  212. 18:49we already know. I'm going to have a simplified pass after we are done.
  213. 18:54Then I 'm going to raise PRs for both of these things.
  214. 18:57I 'm going to do code reviews and then in the next video we are going to merge them.
  215. 19:02So with that I'm going to see you in the next video.
  216. 19:06Thank you.

The cheat sheet is for signed-in viewers. Inside: the lesson's prompts ready to reuse, the commands and shortcuts, useful links and what to watch out for.

Sign in to get the cheat sheet

Loading the cheat sheet…