Track View > Curve Editor or Dope Sheet > Navigation: Track View toolbar > Zoom Horizontal Extents
Zoom Horizontal Extents is a flyout containing the Zoom Horizontal Extents and Zoom Horizontal Extents Keys buttons.
Use Zoom Horizontal Extents to show only the active time segment, and use Zoom Horizontal Extents Keys to show all keys, including those outside the active time segment.
Zoom Horizontal Extents—Adjusts the magnification of the Track View Key window horizontally so that all of the active time segment is visible at once.
Zoom Horizontal Extents Keys—Scales the Track View Key window horizontally to display the full range of all animation keys. Depending on your animation,
this view could be larger or smaller than the active time segment.