Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
📝 Documentation updates detected! You can review documentation updates here |
Summary
|
| @@ -0,0 +1,10 @@ | |||
| CREATE TABLE IF NOT EXISTS default.tags ( | |||
There was a problem hiding this comment.
I think we should add organization id here as the highest order on the cardinality to help the queries be faster. Also to check auth faster in the SessionManager
|
|
||
| async getSessionTag( | ||
| sessionId: string | ||
| ): Promise<Result<string | null, string>> { |
There was a problem hiding this comment.
there is no auth checks here
There was a problem hiding this comment.
own clarification: org check
| const [formTag, setFormTag] = useState(getTag(id, type) || ""); | ||
| const { setNotification } = useNotification(); | ||
| const [open, setOpen] = useState(false); | ||
| useEffect(() => { |
There was a problem hiding this comment.
I know this is the way zustand recommends to do it, but i feel like there has to be a better way LOL
There was a problem hiding this comment.
added a helper function to set it instead :D. Also better typing here
There was a problem hiding this comment.
dope you got the filterd to work
| continue; | ||
| } | ||
|
|
||
| switch (true) { |
There was a problem hiding this comment.
nit, switches in typescript are not like Elixr or Rust.
They SUCK.
Rust match statements >>>>
but in typescript it kind of annoying.
If you wanna use a switch, I ask that you move it to a helper function and use returns so we can remove all breaks
| }), | ||
| sessions_request_response_rmt: | ||
| easyKeyMappings<"sessions_request_response_rmt">({}), | ||
| easyKeyMappings<"sessions_request_response_rmt">({ |
There was a problem hiding this comment.
dope you figured it out!
There was a problem hiding this comment.
PR Summary
This PR implements a comprehensive session tagging system to replace the existing thumbs up/down feedback mechanism, with support for both UI management and backend filtering capabilities.
- New ClickHouse
tagstable added inschema_46_tags.sqlusing ReplacingMergeTree for deduplicating tagged entities - Introduced
SessionTagcomponent inweb/components/templates/feedback/sessionTag.tsxwith modal interface and state management via useTagStore - Changed latency calculation in
web/lib/sessions/helpers.tsfrom time-span to cumulative trace latency - Added special tag filtering in
valhalla/jawn/src/lib/shared/filters/filters.tsusing subqueries to filter sessions by tag values - Expanded
copy-packages.shto copy entire common directory instead of just auth/server for better package sharing
26 file(s) reviewed, 9 comment(s)
Edit PR Review Bot Settings | Greptile
web/components/templates/sessions/sessionId/Timeline/SessionTimelineTable.tsx
Show resolved
Hide resolved
d64ad7e to
3ce2a30
Compare
| entity_id String, | ||
| tag String, | ||
| created_at DateTime DEFAULT now(), | ||
| PRIMARY KEY (organization_id, entity_type, entity_id, tag) |
There was a problem hiding this comment.
| PRIMARY KEY (organization_id, entity_type, entity_id, tag) | |
| PRIMARY KEY (organization_id, entity_type) |
Primary keys are weird in clickhouse.
We want to have it as the highest order granuale that is ~8k rows
This will be sufficient
49f733f to
10108fa
Compare
10108fa to
04ab277
Compare

Notion:
Frontend:
Note
Steps: