You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add frontend UI support for location alias visualization
Frontend changes to visualize location aliases and definition lines:
TypeScript interface updates (dataLoader.ts):
- Extend SourceMapping interface with new optional fields:
* type/kind: Entry type (e.g., "loc_def" for definition lines)
* loc_id: The #loc identifier (e.g., "13" for #loc13)
* alias_name: Name from alias definition (e.g., "x_ptr")
* alias_of: Target #loc that this alias references
CodeViewer enhancements (CodeViewer.tsx):
- Import CodeViewer.css for loc definition styling
- Add sourceMapping prop to BasicCodeViewer, LargeFileViewer,
StandardCodeViewer
- Detect loc definition lines via mapping.type === "loc_def"
- Apply .loc-definition-line CSS class for visual marking
- Generate tooltip text showing alias chain information:
"Location definition: x_ptr → #loc2"
- Set data attributes for debugging and future features:
data-loc-id, data-alias-name, data-loc-def
Styling (CodeViewer.css - new file):
- .loc-definition-line: Golden background (#FFD700 at 15% opacity)
- Hover state: Increased opacity (25%) for better visibility
- Dark theme support with adjusted colors
- .alias-badge: Prepared for future inline badge display
This completes the frontend portion enabling users to visually
identify location definition lines and understand alias chains
through tooltips when hovering over #loc definitions in TTIR/TTGIR.
0 commit comments