Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Prebuild workspaces show incorrect "last used" timestamp when claimed #20170

Open
Labels
prebuildsArea: Prebuildss3Bugs that confuse, annoy, or are purely cosmetic
@blink-so

Description

@blink-so

Bug Description

When a user claims a prebuild workspace, the workspace displays when the prebuild was originally created (e.g., "7 hours ago") rather than when the user actually claimed it (e.g., "7 minutes ago"). This is confusing for users who expect to see how recently they started using the workspace.

Steps to Reproduce

  1. Create a prebuild workspace and wait several hours
  2. Have a user claim the prebuild workspace
  3. Check the workspace list UI
  4. Notice the timestamp shows hours ago instead of minutes ago

Expected Behavior

The workspace should show when the user claimed it (e.g., "7 minutes ago")

Actual Behavior

The workspace shows when the prebuild was originally created (e.g., "7 hours ago")

Root Cause

Incoderd/workspaces.go, when a prebuild workspace is claimed, theLastUsedAt field is not updated. The workspace retains its originalLastUsedAt timestamp from when the prebuild was created.

Proposed Fix

Update theLastUsedAt field when claiming a prebuild workspace:

// Prebuild found!workspaceID=claimedWorkspace.IDinitiatorID=prebuildsClaimer.Initiator()// Update the LastUsedAt field to reflect when the user claimed the prebuilderr=db.UpdateWorkspaceLastUsedAt(ctx, database.UpdateWorkspaceLastUsedAtParams{ID:workspaceID,LastUsedAt:now,})iferr!=nil {returnxerrors.Errorf("update workspace last used at: %w",err)}

This ensures the timestamp reflects when the user actually started using the workspace, not when it was originally created as a prebuild.

Context:Slack

Metadata

Metadata

Assignees

No one assigned

    Labels

    prebuildsArea: Prebuildss3Bugs that confuse, annoy, or are purely cosmetic

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp