Commit Graph
3 Commits
Author SHA1 Message Date
Saxon FletcherandClaude Opus 5.5 07574deea7 chore(studio): refine log detail panel (#52750)
<img width="823" height="614" alt="image"
src="https://github.com/user-attachments/assets/1c1ac47f-07e2-4bbe-a91e-5690e849e519"
/>

## Problem

The log detail panel felt cramped. The header split across two lines,
contrast between the header, tabs and properties was weak, and long
values overflowed their column. Edge function logs also had no path in
the unified logs query, so their title fell back to the raw event
message, which repeated the status and cut off the function name.

The panel also moved under the user. Clicking a Timeline step jumped to
Overview, so stepping through a request meant switching back each time,
and an "Enriching log..." row pushed the details down while they loaded.

## Solution

- **Header:** one line with the type icon, status badge, method and
path. The log type name moves to the icon's tooltip. Long paths clip
from the start so the most specific segment stays visible.
- **Type and spacing:** 15px title, 12px property labels and values,
40px section and "Logged" rows, and more room around the tabs. The panel
uses the card background.
- **Long values:** wrap inside their column instead of overlapping the
label.
- **Edge function paths:** the ClickHouse query now reads
`request.pathname` for `function_edge_logs`, matching the BigQuery
query.
- **Timeline:** clicking a step keeps the Timeline tab open, while the
header, actions and other tabs follow the clicked log. A single hidden
step is shown instead of "+1 more", and the first step shows its
absolute time in place of the "Request started" row.
- **Loading:** the header's type icon becomes a spinner of the same size
while the log's details load, replacing the "Enriching log..." row.
- **User tab:** the "No signed-in user" state uses the same centered
empty state as the Timeline tab.

Side effects to check:

- Edge function rows now fill the Path column, so function-scoped tables
can show that column. Path filters and facets include these rows, and
Timeline steps show method and path.
- Audit Logs and the Auth Users panel share these components. Audit Logs
picks up the taller section rows, and Auth Users fields drop to 12px.

## How to test

On `/project/<ref>/logs`:

1. Select an API Gateway log. The header is one line: icon, status
badge, `METHOD /path`. The icon spins while details load, and nothing
below it shifts when it stops.
2. Open **Timeline** and click a few steps. The tab stays on Timeline
while the header and highlight follow each click, and Overview then
shows the clicked log. The first step shows a time instead of `+0 ms`.
3. Select an edge function log. The title shows `METHOD
/functions/v1/<name>` and the Path column is filled. Filtering by part
of that path matches these rows.
4. Select a Postgres log. The title shows the message, and its **User**
tab shows a centered empty state like Timeline's "No related logs".
5. Select a log with a long URL in a narrow panel. Values wrap inside
their column and the title clips from the start. This has only been
checked in Chromium.
6. Open an entry in Audit Logs and a user in Auth > Users, and check the
spacing and type.

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 07:14:44 +10:00
Joshen Lim 09a1f431bc Mass update for all lucide icon imports to use the component with Icon suffix (#51659)
## Context

This is largely just a mechanical change here:
Opting to use lucide icons with the `Icon` suffix across all icon
imports within `studio`
- so that it’s clearer which components are icons + reduces the
possibility of name collision with our own components
- e.g <User /> vs <UserIcon />

Also added a eslint rule for this:
<img width="1069" height="167" alt="image"
src="https://github.com/user-attachments/assets/7f36f443-5ca2-4bf6-8d22-86e774513bfc"
/>

And updated `AGENTS.md` as such:
```
Icons come from `lucide-react`, always imported with the `Icon` suffix (`import { CheckIcon, Trash2Icon } from 'lucide-react'`) — never the bare names (`Check`) or `Check as CheckIcon` aliases (lint-enforced).
```
2026-10-14 12:56:55 +02:00
Joshen Lim 9a60994efb Update account audit logs to follow unified logs UX (#50799)
## Context

This one's just something that I thought about while doing some
debugging - our audit logs UI is pretty outdated and hard to skim as the
information is very sparse. This is how it currently looks like
(specifically Account audit logs for this PR, there's also org audit
logs):

<img width="1450" height="957" alt="image"
src="https://github.com/user-attachments/assets/4b69511e-1d4f-4725-8ea9-78ddacf76942"
/>

<img width="1450" height="954" alt="image"
src="https://github.com/user-attachments/assets/ec099f52-adef-499c-965a-11b8404bf235"
/>

Am opting to follow the same UX as that of our Unified Logs, so opting
to update the UI as such:

<img width="1451" height="958" alt="Screenshot 2026-09-23 at 22 04 33"
src="https://github.com/user-attachments/assets/016bd26d-4078-42dc-9ff2-5bae9edbc1b2"
/>
<img width="1451" height="957" alt="Screenshot 2026-09-23 at 22 16 09"
src="https://github.com/user-attachments/assets/f038b635-1359-4710-bc84-0f32ace1fb82"
/>
<img width="1450" height="956" alt="Screenshot 2026-09-23 at 22 16 37"
src="https://github.com/user-attachments/assets/7230b94a-c7ec-4550-bb55-5405ebc074a7"
/>

More importantly, we'll allow users to copy logs as JSON so users can
eject to their own agent if needed
<img width="1201" height="350" alt="image"
src="https://github.com/user-attachments/assets/587ab881-a501-41e6-8c9b-59191a2b2047"
/>

## To test
- [ ] Mainly just need to make sure that account audit logs still works
as expected - it's all read only so just need to ensure that all
information that's available before, is still available


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Browse account activity logs with date-range and project filters,
project search, sorting, and refresh controls. Results automatically
refresh every five minutes.
* Choose preset date ranges, select individual logs or ranges of rows,
and copy selected entries as formatted JSON.
* Open a log to view request, actor, target, and action details, or
inspect and copy its raw data.
* Select log rows with a mouse or keyboard, and view loading, error,
empty-results, and filtered-empty states.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-24 11:07:36 +00:00