Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PerpetualSoftware/pad
/ functions
Functions
8,091 in github.com/PerpetualSoftware/pad
⨍
Functions
8,091
◇
Types & classes
983
↓ 4 callers
Method
doClaimCodeGet
()
internal/server/handlers_claim_code_test.go:95
↓ 4 callers
Function
doHeadlessBootstrap
doHeadlessBootstrap is the shared core of the non-interactive (agent) admin bootstrap introduced by BUG-988. Both setupCmd and padInitCmd funnel throu
cmd/pad/cmd_auth.go:240
↓ 4 callers
Function
docsCollection
docsCollection returns the standard Docs collection shared across templates.
internal/collections/templates.go:248
↓ 4 callers
Method
down
Press a finger down at (x, y); sends `touchStart` with the full active set.
web/e2e/lib/attachment-viewer.ts:349
↓ 4 callers
Function
drainSSE
drainSSE collects everything published to a workspace's channel, giving stragglers a short window to arrive.
internal/server/handlers_items_copy_test.go:633
↓ 4 callers
Method
drainWebhooks
drainWebhooks collects deliveries over one quiet window. The window is a wait for something that must NOT arrive in half these assertions, so it is ge
internal/server/handlers_items_copy_test.go:649
↓ 4 callers
Function
droppedByKey
(resp ItemCopyPreflight, key string)
internal/server/handlers_items_copy_preflight_test.go:240
↓ 4 callers
Method
emailUnverifiedBlocked
emailUnverifiedBlocked is the central predicate for PLAN-1933 DR-4's email-verification gate. It reports whether a request carrying `user` must be rej
internal/server/middleware_verified_email.go:41
↓ 4 callers
Method
enforcePlanLimit
--- Plan Limit Enforcement --- enforcePlanLimit checks a workspace-scoped plan limit and writes a 403 error if the limit is exceeded. Returns true if
internal/server/handlers_cloud.go:1078
↓ 4 callers
Method
ensureRouter
ensureRouter lazily initializes the router on first use, so all Set* configuration is applied before the middleware chain is built.
internal/server/server.go:1866
↓ 4 callers
Function
ensureState
(ws: string)
web/src/lib/stores/localIndex.svelte.ts:143
↓ 4 callers
Function
escapeMarkdownCell
escapeMarkdownCell makes an arbitrary string safe INSIDE a table cell: it sanitizes as above, then escapes backslashes and pipes. Order matters. Esca
internal/cli/format_markdown.go:48
↓ 4 callers
Method
evict
evict removes an entry. No-op on empty id or unknown id. Fires onChange only when an entry was actually removed. See touch's comment for why onChange
internal/server/middleware_mcp_session.go:128
↓ 4 callers
Method
fetcherFor
(user *models.User)
internal/mcp/resources_http_attachment_acl_test.go:112
↓ 4 callers
Function
fileRef
(id string)
internal/store/attachments_copy_plan_test.go:106
↓ 4 callers
Function
flush
( ctx: CollabFlushContext, markdown: string, keepalive: boolean, )
web/src/lib/collab/collabFlush.svelte.ts:171
↓ 4 callers
Function
forcePlainColor
forcePlainColor disables ANSI so width/content assertions are deterministic regardless of whether the test binary's stdout happens to be a TTY.
internal/cli/format_test.go:15
↓ 4 callers
Function
frontRoot
()
web/src/lib/a11y/viewerBackdrop.ts:64
↓ 4 callers
Function
getCSRFToken
()
web/src/lib/api/client.ts:404
↓ 4 callers
Method
getItemTx
getItemTx is the in-transaction variant of GetItem. Used by UpdateItemWithPreCheck to re-read the parent under the workspace + parent-children locks s
internal/store/items.go:601
↓ 4 callers
Function
getNaturalBoundsPx
()
web/src/lib/components/editor/attachment-crop-modal.ts:297
↓ 4 callers
Function
guardSchemaAhead
guardSchemaAhead refuses to start when the database contains migrations this binary doesn't ship — i.e. the DB is AHEAD of the binary, the tell-tale o
internal/store/migration_guard.go:62
↓ 4 callers
Function
handleCmdhelpCapabilitiesFallback
handleCmdhelpCapabilitiesFallback scans args for the --cmdhelp-capabilities flag (cmdhelp v0.1 §8 fallback form). If found, it writes the capability b
cmd/pad/main.go:70
↓ 4 callers
Method
handleCopyItem
handleCopyItem copies one item into another workspace, optionally archiving the source. See the file header for the full contract.
internal/server/handlers_items_copy.go:295
↓ 4 callers
Function
head
(s string, lines int)
internal/cmdhelp/md_test.go:371
↓ 4 callers
Method
insertOAuthRequestRow
============================================================ Helpers — shared by the three "request-row" tables ======================================
internal/store/oauth.go:575
↓ 4 callers
Function
invalidateAttachmentMetadata
(workspaceSlug: string, uuid: string)
web/src/lib/components/editor/attachment-metadata.ts:146
↓ 4 callers
Function
isBlockedByModal
(owner?: Element | null, event?: Event | null)
web/src/lib/a11y/viewerBackdrop.ts:376
↓ 4 callers
Function
isDeadlockError
isDeadlockError reports whether err is a genuine deadlock — Postgres' SQLSTATE 40P01. It deliberately does NOT match SQLite's "database is locked"; se
internal/store/items_cross_workspace_copy.go:1163
↓ 4 callers
Function
isReadOnlyAction
isReadOnlyAction reports whether (toolName, action) performs no mutation. Defaults to false (write) for any pair not in the allowlist — the conservati
internal/mcp/tool_surface.go:181
↓ 4 callers
Function
isSupportedOAuthProvider
isSupportedOAuthProvider reports whether provider is one pad accepts.
internal/server/handlers_cloud.go:34
↓ 4 callers
Function
isUUID
(s string)
internal/server/handlers_items.go:2655
↓ 4 callers
Function
itemCopyList
itemCopyList renders a list of server-supplied strings. Every element is quoted, unconditionally — unlike itemCopyLine, which quotes only when it mus
cmd/pad/cmd_item.go:2286
↓ 4 callers
Function
itemDisplayLabel
(item *models.Item)
cmd/pad/lineage.go:205
↓ 4 callers
Function
itemRefOrSlug
itemRefOrSlug formats an item's issue ref (e.g. "TASK-5") when its collection prefix + item number are populated, falling back to its slug. Avoids pul
internal/server/handlers_items_open_children_guard.go:99
↓ 4 callers
Function
itoa
itoa is strconv.Itoa renamed to keep test bodies readable when they're already heavy on ref-formatting.
internal/store/wiki_links_test.go:1698
↓ 4 callers
Function
listCmd
()
cmd/pad/cmd_item.go:377
↓ 4 callers
Function
liveAttachmentCount
liveAttachmentCount counts the workspace's live, non-derived attachment rows — the quota-counted surface a refused transform must not grow.
internal/server/handlers_attachments_transform_authz_test.go:132
↓ 4 callers
Function
makeEditor
(element: HTMLElement, address = DEFAULT_ADDRESS)
web/src/lib/components/editor/attachmentImageMissing.svelte.test.ts:83
↓ 4 callers
Function
makeEditor
(element: HTMLElement, address = () => ADDRESS)
web/src/lib/components/editor/attachmentChipPanel.svelte.test.ts:61
↓ 4 callers
Function
mapRoleUpdate
mapRoleUpdate dispatches `pad role update <slug> [--name ...] [--slug ...] [--description ...] [--icon ...] [--tools ...] [--sort-order ...]`. PATCH
internal/mcp/dispatch_http_routes.go:806
↓ 4 callers
Function
marshalItemFields
(fieldsMap map[string]any)
internal/models/item.go:545
↓ 4 callers
Function
mkACLUser
(t *testing.T, st *store.Store, email string)
internal/mcp/resources_http_attachment_acl_test.go:134
↓ 4 callers
Function
mkAdminCookieReq
mkAdminCookieReq is the same shape minus the Authorization header. Simulates the cookie-session path where isBearerAuth must return false and the admi
internal/server/handlers_admin_bearer_gate_test.go:47
↓ 4 callers
Function
mount
(html: string)
web/src/lib/collections/paneFocus.svelte.test.ts:17
↓ 4 callers
Function
mustCollection
(t *testing.T, srv *Server, wsID, name string)
internal/server/authz_cross_workspace_test.go:105
↓ 4 callers
Function
mustCreateOwnedWorkspace
(t *testing.T, srv *Server, name string, owner *models.User)
internal/server/token_workspace_consent_scope_test.go:56
↓ 4 callers
Function
mustCreatePATForTest
mustCreatePATForTest creates a real PAT against a fresh user + workspace. Returns the raw token string suitable for the Authorization: Bearer header.
internal/server/handlers_mcp_test.go:1831
↓ 4 callers
Function
mustLegacyPlanLink
--- TASK-2369: the ACL filter must be visible, and must not leak ------- mustLegacyPlanLink writes an item_links row carrying the pre-rename "plan" li
internal/server/handlers_items_copy_preflight_test.go:1503
↓ 4 callers
Function
mustWorkspaceID
mustWorkspaceID resolves a workspace slug to its internal ID via the store. Tests use it because they don't have access to the request context that ge
internal/server/handlers_attachments_test.go:823
↓ 4 callers
Function
newAttachmentACLFixture
(t *testing.T)
internal/mcp/resources_http_attachment_acl_test.go:39
↓ 4 callers
Function
newParentFixture
(t *testing.T)
internal/mcp/dispatch_http_clear_parent_test.go:46
↓ 4 callers
Function
newRestoreCollabFixture
(t *testing.T, name string)
internal/server/handlers_items_collab_versions_test.go:566
↓ 4 callers
Function
noBearerRequest
noBearerRequest returns a bare request with no Authorization header — isBearerAuth(r) reports false for it, matching a cookie-session-style caller. No
internal/server/handlers_watch_access_test.go:17
↓ 4 callers
Function
normalizeServerURL
normalizeServerURL canonicalizes a server URL for use as a credential key. Trailing slash and surrounding whitespace are stripped; nothing else is tou
internal/cli/credentials.go:256
↓ 4 callers
Function
normalizeWebhookEvents
normalizeWebhookEvents canonicalizes a webhook's event filter to the JSON-array string the store + dispatcher expect. Returns (value, true) when a no
internal/mcp/dispatch_http_routes.go:935
↓ 4 callers
Function
notifyAttachmentDeleted
(uuid: string)
web/src/lib/attachments/events.ts:45
↓ 4 callers
Function
notifyAttachmentSurfaceOpen
(event: AttachmentSurfaceOpenEvent)
web/src/lib/attachments/events.ts:457
↓ 4 callers
Function
nthPositional
nthPositional returns pos[n] or "" when absent.
internal/mcp/resources_http.go:319
↓ 4 callers
Function
numericInput
numericInput pulls an int64 out of a JSON-typed input value. JSON decoders deliver numbers as float64 (or json.Number when UseNumber()); we accept bot
internal/mcp/dispatch_http_routes.go:1334
↓ 4 callers
Method
oauthRequestToFositeRequest
oauthRequestToFositeRequest hydrates a stored row into a fresh fosite.Request, fetching the client by ID and unmarshalling the session bytes into the
internal/oauth/storage.go:495
↓ 4 callers
Method
onError
Surface an upload failure to the user.
web/src/lib/utils/commentAttachments.ts:99
↓ 4 callers
Method
openBootstrapEnabled
openBootstrapEnabled reports whether open-bootstrap is active for this server: bypass flag is set AND we're not in cloud mode. Cloud mode always wins
internal/server/bootstrap.go:199
↓ 4 callers
Function
paneNavInFlight
()
web/src/lib/collections/paneHostController.ts:147
↓ 4 callers
Method
parentLink
(t *testing.T)
internal/mcp/dispatch_http_clear_parent_test.go:133
↓ 4 callers
Function
parseCollectionFieldsDSL
parseCollectionFieldsDSL parses the CLI's --fields DSL into a {fields: [...]} map ready for json.Marshal. Empty input returns an empty Fields slice (t
internal/mcp/dispatch_http_routes.go:578
↓ 4 callers
Function
parseFields
(item: Item)
web/src/lib/types/index.ts:2001
↓ 4 callers
Function
parseItemFields
(fieldsJSON string)
internal/models/item.go:523
↓ 4 callers
Function
parseMutableItemFields
(fieldsJSON string)
internal/models/item.go:534
↓ 4 callers
Function
parseSessionIdentity
parseSessionIdentity reads the self-declared session identity off a stream request. It never fails: every malformed input degrades to the S1 behaviour
internal/server/session_identity.go:63
↓ 4 callers
Function
parseWorkspaceSettingsMap
(raw string)
internal/models/workspace_settings.go:148
↓ 4 callers
Function
prStateColor
(state string)
cmd/pad/cmd_github.go:406
↓ 4 callers
Method
preflightAsAttacker
preflightAsAttacker runs the dry run as the restricted editor and returns both the parsed response and the RAW bytes, because one of the assertions be
internal/server/handlers_items_copy_attachment_authz_test.go:104
↓ 4 callers
Method
publishCommentEvent
publishCommentEvent publishes a real-time event for comment changes.
internal/server/handlers_comments.go:494
↓ 4 callers
Function
pushCmd
pushCmd is `pad push <ref> -m "message"` (IDEA-2544 Phase 1) — the "push this to my agent" verb: an explicit, user-authored instruction bound to an it
cmd/pad/cmd_push.go:30
↓ 4 callers
Method
queryOAuthRequestRow
queryOAuthRequestRow reads a row by signature from the named table and returns (request, active, err). - For oauth_pkce_requests, active is always tr
internal/store/oauth.go:671
↓ 4 callers
Function
rawPeerAddr
rawPeerAddr returns the untampered TCP peer address captured by CapturePeerAddr, falling back to the current r.RemoteAddr if the middleware wasn't ins
internal/server/middleware_realip.go:32
↓ 4 callers
Function
read
()
web/src/lib/attachments/hostAddress.test.ts:26
↓ 4 callers
Method
readItem
readItem handles pad://workspace/{ws}/items/{ref}. Why JSON-then-format instead of `--format markdown`: pad's CLI `--format markdown` for `item show`
internal/mcp/resources.go:315
↓ 4 callers
Function
readMigrationNames
readMigrationNames returns sorted .sql filenames from an embedded FS directory.
internal/store/store.go:275
↓ 4 callers
Function
readTOML
Helpers ------------------------------------------------------------------
internal/mcp/install_test.go:792
↓ 4 callers
Function
reconcileNewItem
(t *testing.T, srv *Server, slug, content string)
internal/server/handlers_item_versions_test.go:28
↓ 4 callers
Method
recordMCPCallMetrics
recordMCPCallMetrics fans the audit-row data out to Prometheus. No-op when metrics aren't wired (selfhost / tests). Kept separate from MCPAuditLog so
internal/server/middleware_mcp_audit.go:349
↓ 4 callers
Method
recoverSweeper
recoverSweeper is the panic firewall for the long-running background sweeper loops (orphan GC, op-log GC, token reaper, workspace purge). Each of thos
internal/server/server.go:362
↓ 4 callers
Function
refreshAccessibleName
()
web/src/lib/components/editor/attachment-chip.ts:297
↓ 4 callers
Function
registerNonAdmin
--- helpers --- registerNonAdmin inserts a member-role user directly into the store and mints a session token for them. Bypasses the admin-registratio
internal/server/handlers_admin_billing_test.go:334
↓ 4 callers
Function
renderCommentsMarkdown
renderCommentsMarkdown is the markdown counterpart of cli.PrintCommentTable. Comments are not tabular — the terminal form prints an attribution line t
cmd/pad/cmd_item.go:2567
↓ 4 callers
Function
renderItemCopyResult
renderItemCopyResult writes the outcome of a completed copy.
cmd/pad/cmd_item.go:2145
↓ 4 callers
Function
renderRect
()
web/src/lib/components/editor/attachment-crop-modal.ts:301
↓ 4 callers
Method
replaceWikiLinks
replaceWikiLinks deletes prior wiki-link rows for `sourceItemID` and inserts fresh ones extracted from `content`. Resolution against the workspace's i
internal/store/wiki_links.go:31
↓ 4 callers
Function
requestIsLoopback
(r *http.Request)
internal/server/handlers_auth.go:236
↓ 4 callers
Method
requireConnectionOwner
requireConnectionOwner is the per-mutation prologue. Returns the (currentUser, requestID, ok) triple. On `ok=false` the response has already been writ
internal/server/handlers_connected_apps.go:267
↓ 4 callers
Method
resourceArgs
()
internal/mcp/resources_http_attachment_acl_test.go:119
↓ 4 callers
Method
respondWithConnection
respondWithConnection re-fetches + writes the connection DTO post- mutation so the page can re-render without a separate list refresh. Stats lookup is
internal/server/handlers_connected_apps.go:293
↓ 4 callers
Function
restrictedWarnings
(t *testing.T, f *copyPreflightFixture, u *models.User)
internal/server/handlers_items_copy_preflight_test.go:1624
↓ 4 callers
Function
rootFlagsToArgs
rootFlagsToArgs converts a startup root-flags map into the pre-formatted CLI token list every fetch should append. Empty values are skipped (matching
internal/mcp/resources.go:613
↓ 4 callers
Function
run
(ctx)
web/src/lib/attachments/actions.ts:218
↓ 4 callers
Method
runOpenChildrenGuard
runOpenChildrenGuard executes the guard logic inside the store-layer transaction. Returns: - (nil, nil) when the guard doesn't apply (no transition,
internal/server/handlers_items_open_children_guard.go:155
↓ 4 callers
Function
runTopEscape
(event?: KeyboardEvent)
web/src/lib/stores/escapeStack.ts:85
↓ 4 callers
Function
samplePlaybook
()
internal/artifact/encode_test.go:13
← previous
next →
1,001–1,100 of 8,091, ranked by callers