Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| The apps you pin to your dock are kept with your account, per workspace and in your order, so the dock is the same on every device: identity keeps them in dock_pins and answers dock_pins and set_dock_pins, the dock reads them with the rest of the page, pins kept only on this device carry over with your first change, this device's copy still draws the dock when identity can't be reached, a pin that can't be saved says so, and they go when you or the workspace do; the workspaces guide says how. | 1 | -- The apps each person pins to their dock, per workspace, so the dock is |
| 2 | -- the same on every device they sign in on. `apps` is a JSON array of app | |
| 3 | -- keys (such as ["projects","usage"]) in the order the person set; the | |
| 4 | -- web app checks the keys against its list of apps. A workspace with no | |
| 5 | -- row has never had its pins saved. See src/dock.rs. | |
| 6 | CREATE TABLE dock_pins ( | |
| 7 | user_id TEXT NOT NULL REFERENCES users (id) ON DELETE CASCADE, | |
| 8 | workspace_id TEXT NOT NULL REFERENCES workspaces (id) ON DELETE CASCADE, | |
| 9 | apps TEXT NOT NULL DEFAULT '[]', | |
| 10 | updated_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')), | |
| 11 | PRIMARY KEY (user_id, workspace_id) | |
| 12 | ); |