An astronaut taking a paintbrush and bucket to give his spaceship a fresh coast of yellow paint."

    Giving the Dashboard a fresh coast of paint

    TLDR

    We spruce up the design of the Dashboard, extend the sessions API, and more.

    The Dashboard gets a visual touch-up

    Dashboard instructions for self-hosting Triplit

    We've been long overdue for a design refresh of the Dashboard. With this week's update,the Dashboard feels more polished and more pleasant to use. We took a fine tooth comb to every page, from project creation, to deployment, to ongoing management. The highlights include:

    • More readability with improved typography, spacing, and icons on all pages
    • More labels and descriptions for forms, sections and actions
    • A pop of color to highlight important actions and sections
    • Clearer deployment instructions, whether you're using Triplit Cloud or self-hosting

    Go forth and explore the updates!

    Custom servers are more bundler-friendly

    It is entirely possible to write your own script that starts a custom server with Triplit using the createTriplitHonoServer function from the @triplit/server package. You can find examples of these custom servers in the runtimes section of the documentation. We've made a change to the server parameters that removes the ability to pass in a storage keyword such as memory or sqlite. Instead, you must now pass in a class instance of a storage provider, which can be created using the createTriplitStorageProvider function from the @triplit/server package, or by importing the storage provider directly from @triplit/db/storage/*. This change allows for some internal reorganization of the Hono server that makes it easier to use custom servers with bundlers esbuild.

    Before:

    import { createServer } from '@triplit/server';
    
    const startServer = await createServer({
      storage: 'sqlite',
      jwtSecret: process.env.JWT_SECRET,
    });
    

    After:

    import { createServer, createTriplitStorageProvider } from '@triplit/server';
    
    const startServer = await createServer({
      storage: await createTriplitStorageProvider('sqlite'),
      jwtSecret: process.env.JWT_SECRET,
    });
    

    Other improvements

    • A client's connection status (e.g. as exposed by the useConnectionStatus hook) is now more reliable and will thrash less when the client is starting or ending a sync session.
    • Fixed an issue preventing a schema from properly removing properties and relationships when updating.
    • Fixed an issue where using the $prev.[attribute] variable prefix would not resolve to undefined when the previous value was not set.
    • Fixed an issue where the server could maintain stale results after the client had unsubscribed from a query.