Skip to content

Commit 510545f

Browse files
authored
refactor(vc): consolidate note handling back into the vc domain (#1417)
1 parent c11cf3b commit 510545f

26 files changed

Lines changed: 196 additions & 1843 deletions

cmd/auth/login_messages.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,5 +128,5 @@ func getLoginMsg(lang i18n.Lang) *loginMsg {
128128
// (not backed by from_meta service specs). Descriptions are now centralized in
129129
// service_descriptions.json.
130130
func getShortcutOnlyDomainNames() []string {
131-
return []string{"base", "contact", "docs", "markdown", "apps", "note"}
131+
return []string{"base", "contact", "docs", "markdown", "apps"}
132132
}

cmd/auth/login_test.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"errors"
1010
"io"
1111
"net/http"
12-
"slices"
1312
"sort"
1413
"strings"
1514
"testing"
@@ -215,12 +214,6 @@ func TestGetShortcutOnlyDomainNames_HaveDescriptions(t *testing.T) {
215214
}
216215
}
217216

218-
func TestGetShortcutOnlyDomainNames_IncludesNote(t *testing.T) {
219-
if !slices.Contains(getShortcutOnlyDomainNames(), "note") {
220-
t.Fatal("shortcut-only domains must include note so auth login can select vc:note:read")
221-
}
222-
}
223-
224217
func TestCollectScopesForDomains(t *testing.T) {
225218
projects := registry.ListFromMetaProjects()
226219
if len(projects) == 0 {

internal/registry/service_descriptions.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@
4747
"en": { "title": "Minutes", "description": "Minutes content and metadata retrieval" },
4848
"zh": { "title": "妙记", "description": "妙记信息获取、内容查询" }
4949
},
50-
"note": {
51-
"en": { "title": "Note", "description": "Meeting note detail and unified transcript retrieval" },
52-
"zh": { "title": "会议纪要", "description": "会议纪要详情与 unified 逐字稿查询" }
53-
},
5450
"sheets": {
5551
"en": { "title": "Sheets", "description": "Spreadsheet operations" },
5652
"zh": { "title": "电子表格", "description": "电子表格操作" }

lint/errscontract/rule_no_legacy_common_helper_call.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@ var migratedCommonHelperPaths = []string{
2525
"shortcuts/doc/",
2626
"shortcuts/drive/",
2727
"shortcuts/event/",
28-
"shortcuts/im/",
2928
"shortcuts/mail/",
3029
"shortcuts/markdown/",
3130
"shortcuts/minutes/",
32-
"shortcuts/note/",
3331
"shortcuts/okr/",
3432
"shortcuts/sheets/",
3533
"shortcuts/slides/",

lint/errscontract/rule_no_legacy_envelope_literal.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,17 @@ var migratedEnvelopePaths = []string{
2626
"shortcuts/doc/",
2727
"shortcuts/drive/",
2828
"shortcuts/event/",
29-
"shortcuts/im/",
3029
"shortcuts/mail/",
3130
"shortcuts/markdown/",
3231
"shortcuts/minutes/",
33-
"shortcuts/note/",
3432
"shortcuts/okr/",
3533
"shortcuts/sheets/",
3634
"shortcuts/slides/",
3735
"shortcuts/task/",
3836
"shortcuts/vc/",
3937
"shortcuts/whiteboard/",
4038
"shortcuts/wiki/",
39+
"shortcuts/im/",
4140
}
4241

4342
// legacyOutputImportPath is the import path of the package that declares the

lint/errscontract/rules_test.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,6 @@ func TestCheckNoLegacyCommonHelperCall_RejectsLegacyHelpersOnMigratedPath(t *tes
953953
paths := []string{
954954
"shortcuts/doc/docs_fetch_v2.go",
955955
"shortcuts/drive/drive_search.go",
956-
"shortcuts/im/im_messages_send.go",
957956
"shortcuts/mail/mail_send.go",
958957
"shortcuts/markdown/markdown_fetch.go",
959958
"shortcuts/okr/okr_progress_create.go",
@@ -989,18 +988,6 @@ common.` + helper + `()
989988
}
990989
}
991990

992-
func TestMigratedCommonHelperPaths_CoverMigratedEnvelopePaths(t *testing.T) {
993-
commonPaths := make(map[string]struct{}, len(migratedCommonHelperPaths))
994-
for _, path := range migratedCommonHelperPaths {
995-
commonPaths[path] = struct{}{}
996-
}
997-
for _, path := range migratedEnvelopePaths {
998-
if _, ok := commonPaths[path]; !ok {
999-
t.Fatalf("migratedEnvelopePaths contains %q but migratedCommonHelperPaths does not", path)
1000-
}
1001-
}
1002-
}
1003-
1004991
func TestCheckNoLegacyCommonHelperCall_RejectsDangerousCharsOnCalendarPath(t *testing.T) {
1005992
src := `package calendar
1006993

shortcuts/note/note.go

Lines changed: 0 additions & 204 deletions
This file was deleted.

shortcuts/note/note_detail.go

Lines changed: 0 additions & 86 deletions
This file was deleted.

0 commit comments

Comments
 (0)