Skip to content

Feat/schema improvements #1060

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Apr 20, 2025
Merged

Feat/schema improvements #1060

merged 28 commits into from
Apr 20, 2025

Conversation

ubik2
Copy link
Contributor

@ubik2 ubik2 commented Apr 16, 2025

Here's an overview of the goal of this PR
https://linear.app/common-tools/issue/CT-179/maintain-schema-query-data-on-subscriptions#comment-a237dac2

I still have some issues I need to track down (mostly later).

  • Should change client traversal to use my schema. Without this, we still fetch more than we should.
  • storage docIsLoading and similar containers should handle loading the same doc with a different schema.
  • Deal with the potential for redundant pushes of the same entity with subscriptions that I introduced.
  • Remove log statements that I littered throughout the code during debugging.

ubik2 and others added 21 commits April 10, 2025 20:54
support flash-lite
* Only re-render CharmList when connection status actually changes

* Update types
import as FactModule instead of Fact to avoid collision
expose the schema associated with the facts from QueryView
make schemaContext optional in SchemaPathSelector, since I don't want to traverse commit logs
Change default storage to cached
User Feedback UI
 - Implemented FeedbackActions and FeedbackDialog components in Jumble to allow users to submit positive or negative feedback on generated content.
 - Added interactive thumbs-up/down buttons with feedback form submission workflow.

Trace Span ID Management
 - Added functions (setLastTraceSpanID, getLastTraceSpanID) to manage trace IDs in the builder environment.
 - Updated builder exports to expose new trace ID functions.

Integration of Trace ID in LLM Client
 - Modified LLMClient to capture x-ct-llm-trace-id from response headers and store it via setLastTraceSpanID.

Backend Feedback Handling
 - Extended toolshed API (/api/ai/llm/feedback) to accept user feedback and relay it to Phoenix observability backend.

Instrumentation and Span Filtering
 - Enhanced OpenTelemetry instrumentation to include specific spans relevant to LLM inference requests for better observability.
…sk/return

changed so the server sends each response to each subscriber, even though there may be duplicates. a schema subscription on the client needs to know its updated list of entities
added lots of debugging to try to track down this stall issue
cleaned up logging and comments
@ubik2
Copy link
Contributor Author

ubik2 commented Apr 17, 2025

This can be enabled by setting VITE_STORAGE_TYPE to schema

I ended up changing the query/graph/schema combination query and subscribe path to accept both the task/return and ongoing task/effect results. It doesn't unsubscribe when it gets the task/return.

I also switched the subscription messages so they are dispatched to their caller, even if that means we send the same object more than once over the wire. The new cached storage type tends to only run with one subscription (to the commit+json), so it's not too wasteful, and I think the older remote path should be deprecated at this point. This also lets me avoid handling commit style messages in the normal subscriptions, and avoid handling objects without transactions in the commit+json subscription.

I changed some of the machinery of traversing a document, but did not get around to changing the client traversal yet (nor did I make it synchronous, though it can be done that way now).

There's some minor issues in charm.ts if we are trying to load the same document with multiple different schemas. We should be able to handle that and keep the different loads apart, but I don't think we actually use it, so I didn't spend more time on that.

@ubik2 ubik2 marked this pull request as ready for review April 17, 2025 16:37
@ubik2 ubik2 merged commit a9c668e into main Apr 20, 2025
5 checks passed
@ubik2 ubik2 deleted the feat/schema-improvements branch April 20, 2025 18:26
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.

6 participants