Skip to content

fix(petpassport): stop opening a walk from marking it walked - #68

Open
harish-gaggar wants to merge 2 commits into
google:mainfrom
harish-gaggar:fix/pet-passport-walk-status
Open

harish-gaggar wants to merge 2 commits into
google:mainfrom
harish-gaggar:fix/pet-passport-walk-status

Conversation

@harish-gaggar

Copy link
Copy Markdown

Description

Opening a saved Pet Passport walk also toggled its walked flag. The details view then kept the previous badge, so reading an itinerary marked the walk as done.
The card title now only opens the itinerary. A separate Walked / Not walked button on the card and in the details view saves the status. A second click while a save is in flight is ignored, and a failed save rolls the badge back. Itinerary text wraps on word boundaries, and the details header no longer collides with the back button.

Motivation and Context

The demo's saved-walk list is how a user reviews a route the agent already created. Coupling "open" and "mark walked" made that review change stored state, and the details badge did not match the list.

How Has This Been Tested?

  • Served the static UI with a mock /api/paths and exercised it in the browser.
  • Opening a path sent no save. The itinerary rendered bold text, a list, a map link, and a photo whose file:///tmp/ path was rewritten for the page.
  • Marking one walk walked updated the list badge and the details badge together, and the server stored walked: true.
  • Two clicks during a slow save produced one stored update. A forced HTTP 500 restored both badges to Not walked and left the server unchanged.
  • Opening a second path, returning to chat, and sending a message did not change walked flags.
  • A breed value containing HTML tags was rendered as text.
  • At 1280px the details title sits beside Back to Chat with no overlap. At 390px the title wraps onto the next line.
  • app.js parses cleanly.

Breaking Changes

None. The walked flag still posts the full path object to /api/paths.

Types of changes

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • I have read the repository contributing guidelines
  • My changes are limited to the Pet Passport example UI
  • I have signed the Google Contributor License Agreement (https://cla.developers.google.com/) for mrgaggar@gmail.com
  • I have tested the changed UI in a browser

@google-cla

google-cla Bot commented Oct 11, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Viewing a saved itinerary also flipped its walked flag and left the details badge stale. Opening a passport and changing walked status are now separate actions, and a failed save rolls the badge back.
…ight

A second click before the first save finished could store a different walked value than the badge showed. Extra clicks now wait until that save settles.
@harish-gaggar
harish-gaggar force-pushed the fix/pet-passport-walk-status branch from dbd16ef to 9bd02b7 Compare October 11, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant