XenneX/LLC
All posts
By Buddy Delaune

Why I Put My Own Board in Front of Linear

One Linear workspace, four companies, and a partner who should see two of them. Here's the small Kanban app I built on top, and how its permissions work.

#linear#permissions#internal tools#next.js#engineering decisions
A cork board divided into four columns by strips of blue, green, yellow and orange tape, each filled with blank sticky notes, leaning on a wooden desk with a closed laptop, a set of keys, a mug and a potted plant by a window

All of my work lives in one Linear workspace. XenneX projects, client work for another company I co-own, a hardware business, and a handful of personal things. One team, one set of statuses, one place to look. For me, that's the point.

The problem is that I'm not the only person who needs to see some of it. My business partner in two of those companies should see those projects, but not the other two, and doesn't need to edit tickets. What my partner needs is to know what's happening and leave a comment when there's an answer.

Linear's access model is built around teams. Guests only see the teams they're invited to, but inside those teams they can create and edit issues like anyone else. To give my partner a slice of the workspace, I'd have had to split it into a team per company and change how I work to fit the permissions.

So I went the other way. I left Linear alone and put a small board in front of it.

What It Is

It's a Next.js app with a SQLite cache. It pulls the whole workspace from Linear's API when it starts and every five minutes after that, and Linear webhooks keep it current in between. People sign in with Google, and only email addresses on an allowlist get in.

Every project is tagged with one of four companies. The home page groups projects by company, and each project opens as a Kanban board: columns for each status, cards for each issue, filters for assignee and label. Done cards stay for 14 days and then drop off, so the board shows current work, not history.

There's also a "needs a human" view. A few of my statuses mean someone has to act: a plan waiting for review, a change waiting to deploy, something blocked. That view pulls every card in those states across every project you can see, so the first thing you see is what's waiting on you.

Every Read Takes a Viewer

This is the part I cared most about getting right.

There's one file that reads Linear data from the cache, and every function in it takes a viewer: who you are, whether you're an admin or a member, and which companies you belong to. Each query builds its filter from that viewer. An admin's filter matches everything. A member's filter only matches projects that are tagged with one of their companies, not archived and not hidden.

A few rules fall out of that, and I wrote them down on purpose:

  • Untagged projects are admin-only. A new project in Linear doesn't show up for anyone else until I tag it. Forgetting to tag something keeps it private.
  • Issues without a project are admin-only. A loose ticket never leaks just because it wasn't filed anywhere.
  • "Not found" and "not allowed" look the same. If a member opens a project or ticket outside their companies, they get a 404, not a "you don't have access" page that confirms it exists.
  • A member with no companies sees nothing. The empty case fails closed.

The tests are written against those rules, not the UI. A member sees only their companies' projects. They can't open another project by ID. Board queries, label filters, search and the "needs a human" view never return an issue from outside. When I added full-text search later, it came with its own test that a member's search can't reach outside issues either.

Because there's only one way to read the data, adding a feature doesn't mean remembering to add a permission check. Search was the most recent addition, and it got the scoping for free.

Writes Are Narrower Than Reads

The board can write back to Linear, but only in a few ways.

Writes go through a short, fixed list of Linear mutations: comment on an issue, update an issue, create a project. Nothing takes a raw query from the browser. Before any of them run, one function checks whether the viewer is allowed. Admins can do all of it. Members can do one thing: comment.

And they can only comment on issues they can already see, because the server loads the issue through the same scoped query first. An issue outside their companies never gets far enough to be checked.

The board talks to Linear with my API key, so every write shows up in Linear as me. To keep that honest, a member's comment goes out with their name at the start. Every write also lands in an audit table that I can see on the admin page, and comments are capped at ten per person per minute.

The Small Stuff That Made It Usable

The permissions are why I built it. These are why people actually open it:

  • Admin overrides. I can rename a project, recolor it, reorder it or hide it from members on the board, without touching Linear.
  • Pins. Each person pins the projects they care about. Pins are per person, so mine don't reorder anyone else's board.
  • Search. Press / or ⌘K from anywhere. An exact ticket ID ranks first, then titles, then descriptions, and open work comes before done.
  • Ticket links. Every ticket has a short link. If you're signed out, you sign in and land back on the ticket. If it's not one you can see, it doesn't open.

What I'd Tell Anyone Building This

Put the permission check where the data is read, not where it's shown. If the UI decides who sees what, every new page is a chance to forget.

Make the safe state the default. Untagged and unfiled should both mean private. That way a mistake costs someone a minute of waiting instead of exposing something.

Keep writes smaller than reads. Seeing everything in your area and changing very little of it is a fine place for most people to be.

Don't change your workflow to fit someone else's permission model. A small app in front of the tool was cheaper than reorganizing how I work.

If you've got a tool your team lives in and a permission model that doesn't quite fit, that's the kind of problem I help with in advisory.

Working on something like this? See architecture advisory or what XenneX has built.

Keep reading